Enhance VideoEditor functionality: implement loading of saved state when opening videos, ensuring continuity in user experience across sessions.
This commit is contained in:
		@@ -1149,6 +1149,8 @@ class VideoEditor:
 | 
			
		||||
            self.current_video_index = video_index
 | 
			
		||||
            self._load_video(video_path)
 | 
			
		||||
            self.load_current_frame()
 | 
			
		||||
            # Load the saved state for this video (same logic as normal video loading)
 | 
			
		||||
            self.load_state()
 | 
			
		||||
            print(f"Opened video: {video_path.name}")
 | 
			
		||||
        except ValueError:
 | 
			
		||||
            print(f"Video not found in current session: {video_path.name}")
 | 
			
		||||
@@ -1160,6 +1162,8 @@ class VideoEditor:
 | 
			
		||||
                self.current_video_index = video_index
 | 
			
		||||
                self._load_video(video_path)
 | 
			
		||||
                self.load_current_frame()
 | 
			
		||||
                # Load the saved state for this video (same logic as normal video loading)
 | 
			
		||||
                self.load_state()
 | 
			
		||||
                print(f"Opened video: {video_path.name}")
 | 
			
		||||
            else:
 | 
			
		||||
                print(f"Could not find video: {video_path.name}")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user