@@ -73,8 +73,9 @@ def action_OpenFile(self, openfile_name=None):
7373 "mouse_trace" , "vision_transfer" , "pluck" ,
7474 "super_fl_local" ])
7575 self .ui_video_control .add_new_video_set_tab (video_set )
76- self .ui_video_control .videoTabClicked .connect (lambda x : self .play_video (video_set [x ].evf_video ))
77- self .ui_video_control .videoTabDoubleClicked .connect (lambda x : self .play_video (video_set [x ].evf_video , True ))
76+ self .ui_video_control .videoTabClicked .connect (self .play_video_tab_name_id )
77+ self .ui_video_control .videoTabDoubleClicked .connect (
78+ lambda a , b : self .play_video_tab_name_id (a , b , True ))
7879 # self.tab_data.append(video_set)
7980 video = video_set [0 ].evf_video
8081 else :
@@ -179,6 +180,16 @@ def play_video(self, video, new_tab=False):
179180 self .timer_video .start (10 )
180181
181182
183+ # 根据标签名和索引播放录像
184+ def play_video_tab_name_id (self , tab_name , idv , new_tab = False ):
185+ tab_count = self .ui_video_control .tabWidget .count ()
186+ for index in range (tab_count ):
187+ tab_widget = self .ui_video_control .tabWidget .widget (index )
188+ if tab_widget .tab_name == tab_name :
189+ self .play_video (tab_widget .video_set [idv ].evf_video , new_tab )
190+ return
191+
192+
182193 # 切换标签时,播放标签中的录像
183194 def on_tab_clicked (self , idt ):
184195 if isinstance (self .ui_video_control .tabWidget .widget (idt ), videoControl .VideoTabWidget ):
0 commit comments