From 6a67b5b0175dc446079f9c5df218884d10f814ce Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Mon, 16 Nov 2026 13:03:00 +0100 Subject: [PATCH] fix: saving a model asks "Discard unsaved changes?" right after the save (#34110) Since the workspace pages open as tabs, saving a changed model showed the success message and then the "Discard unsaved changes?" dialog, although the change was already saved, and the model editor stayed open until the dialog was confirmed. Saving now goes straight back to the model list again, as in v0.13.3. Fixes #34087 --- src/lib/components/workspace/Models/ModelEditor.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/workspace/Models/ModelEditor.svelte b/src/lib/components/workspace/Models/ModelEditor.svelte index ab391c1304..218dd9d6fd 100644 --- a/src/lib/components/workspace/Models/ModelEditor.svelte +++ b/src/lib/components/workspace/Models/ModelEditor.svelte @@ -124,7 +124,7 @@ }; let cancelDiscard: (() => void) | null = null; onTabLeave(() => { - if (readOnly || !dirty) return true; + if (readOnly || !dirty || allowNavigation) return true; return new Promise((resolve) => { cancelDiscard = () => resolve(false); discardThen(() => resolve(true));