From 279320d3efda5f5abb5425547de14e9dc7ff7350 Mon Sep 17 00:00:00 2001 From: Siddharth Date: Sat, 2 May 2026 17:49:40 -0700 Subject: [PATCH] fix save prompt despite being saved --- src/components/video-editor/VideoEditor.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/video-editor/VideoEditor.tsx b/src/components/video-editor/VideoEditor.tsx index 7adc558..a89c436 100644 --- a/src/components/video-editor/VideoEditor.tsx +++ b/src/components/video-editor/VideoEditor.tsx @@ -430,7 +430,7 @@ export default function VideoEditor() { return false; } - const projectData = createProjectData(currentProjectMedia, { + const editorState = { wallpaper, shadowIntensity, showBlur, @@ -452,14 +452,17 @@ export default function VideoEditor() { gifFrameRate, gifLoop, gifSizePreset, - }); + }; + const projectData = createProjectData(currentProjectMedia, editorState); const fileNameBase = currentProjectMedia.screenVideoPath .split(/[\\/]/) .pop() ?.replace(/\.[^.]+$/, "") || `project-${Date.now()}`; - const projectSnapshot = JSON.stringify(projectData); + // Match the normalization path used by `currentProjectSnapshot` so the + // post-save baseline compares equal and `hasUnsavedChanges` clears. + const projectSnapshot = createProjectSnapshot(currentProjectMedia, editorState); const result = await window.electronAPI.saveProjectFile( projectData, fileNameBase,