diff --git a/croppa/main.py b/croppa/main.py index 6342929..c83abb5 100644 --- a/croppa/main.py +++ b/croppa/main.py @@ -108,6 +108,10 @@ class ProjectView: except Exception as e: print(f"Error loading progress for {video_path.name}: {e}") + def refresh_progress_data(self): + """Refresh progress data from JSON files (call when editor state changes)""" + self._load_progress_data() + def get_progress_for_video(self, video_path: Path) -> float: """Get progress (0.0 to 1.0) for a video""" if video_path in self.progress_data: @@ -564,6 +568,11 @@ class VideoEditor: with open(state_file, 'w') as f: json.dump(state, f, indent=2) print(f"State saved to {state_file}") + + # Refresh project view progress data if project view is active + if self.project_view_mode and self.project_view: + self.project_view.refresh_progress_data() + return True except Exception as e: print(f"Error saving state: {e}")