From 76ec25df16629b17f7d2775f4d2a54db0d022428 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Tue, 27 Oct 2026 12:37:44 +0000 Subject: fix(bundle): automatically save changed documents before closing Co-Authored-By: Claude Opus 5.5 --- bundle/src-tauri/src/main.rs | 2 +- bundle/src-tauri/src/menu.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'bundle/src-tauri/src') diff --git a/bundle/src-tauri/src/main.rs b/bundle/src-tauri/src/main.rs index 7dbccd9..c9babb4 100644 --- a/bundle/src-tauri/src/main.rs +++ b/bundle/src-tauri/src/main.rs @@ -102,7 +102,7 @@ fn main() { .on_menu_event(|app, event| { let mut windows = app.webview_windows().into_values(); if event.id() == "quit" { - // Each window runs its unsaved-changes prompt; the app exits after the last. + // Each window saves changes before closing; the app exits after the last. windows.for_each(|window| drop(window.close())); } else if let Some(window) = windows.find(|window| window.is_focused().unwrap_or(false)) { diff --git a/bundle/src-tauri/src/menu.rs b/bundle/src-tauri/src/menu.rs index dad3779..6d8507d 100644 --- a/bundle/src-tauri/src/menu.rs +++ b/bundle/src-tauri/src/menu.rs @@ -40,7 +40,7 @@ pub fn build(app: &AppHandle) -> tauri::Result> { .build()?; let menu = MenuBuilder::new(app); // macOS shows the first submenu as the application menu. The predefined Quit terminates - // without closing windows, skipping their unsaved-changes prompts, so "quit" closes them. + // without closing windows, so "quit" closes them to save changes first. #[cfg(target_os = "macos")] let menu = menu.item( &SubmenuBuilder::new(app, "CPSC Bundle") -- cgit v1.3.1-4-g156e