Commit 9fe0778
committed
fix: move save state updates to SavedDocument handler
Fixes #3558 - Cancelling document saving leads to content/modifications being lost
Previously, set_save_state(true) was called in the SaveDocument handler
before the save dialog even appeared. This caused the document to be
marked as saved even if the user cancelled the save dialog.
Now the save state updates (set_save_state, set_auto_save_state) are
called in the SavedDocument handler, which only executes after the file
has actually been written to disk. This ensures that:
- Cancelling the save dialog keeps the document marked as unsaved
- The asterisk indicator remains visible until the file is truly saved
- No content/modifications are lost if the save is cancelled1 parent 2fa958a commit 9fe0778
File tree
1 file changed
+5
-5
lines changed- editor/src/messages/portfolio/document
1 file changed
+5
-5
lines changedLines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1046 | 1046 | | |
1047 | 1047 | | |
1048 | 1048 | | |
1049 | | - | |
1050 | | - | |
1051 | | - | |
1052 | | - | |
1053 | | - | |
1054 | 1049 | | |
1055 | 1050 | | |
1056 | 1051 | | |
| |||
1061 | 1056 | | |
1062 | 1057 | | |
1063 | 1058 | | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
1064 | 1062 | | |
| 1063 | + | |
| 1064 | + | |
1065 | 1065 | | |
1066 | 1066 | | |
1067 | 1067 | | |
| |||
0 commit comments