Enhance VideoEditor functionality: implement loading of saved state when opening videos, ensuring continuity in user experience across sessions.

This commit is contained in:
2025-09-16 09:37:30 +02:00
parent d235fa693e
commit cfd919a377

View File

@@ -1149,6 +1149,8 @@ class VideoEditor:
self.current_video_index = video_index self.current_video_index = video_index
self._load_video(video_path) self._load_video(video_path)
self.load_current_frame() 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}") print(f"Opened video: {video_path.name}")
except ValueError: except ValueError:
print(f"Video not found in current session: {video_path.name}") print(f"Video not found in current session: {video_path.name}")
@@ -1160,6 +1162,8 @@ class VideoEditor:
self.current_video_index = video_index self.current_video_index = video_index
self._load_video(video_path) self._load_video(video_path)
self.load_current_frame() 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}") print(f"Opened video: {video_path.name}")
else: else:
print(f"Could not find video: {video_path.name}") print(f"Could not find video: {video_path.name}")