From 140e40b300359084f4803b77e85f1bd5a7135f2d Mon Sep 17 00:00:00 2001 From: eidheim Date: Fri, 13 Aug 2021 07:58:59 +0200 Subject: [PATCH] Reversed save modified dialog change: answering no now again closes buffer --- src/notebook.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/notebook.cpp b/src/notebook.cpp index 6b6c4fa..dbf8a30 100644 --- a/src/notebook.cpp +++ b/src/notebook.cpp @@ -943,7 +943,10 @@ bool Notebook::save_modified_dialog(size_t index) { dialog.set_default_response(Gtk::RESPONSE_YES); dialog.set_secondary_text("Do you want to save " + filesystem::get_short_path(get_view(index)->file_path).string() + "?"); dialog.show_all(); - if(dialog.run() == Gtk::RESPONSE_YES) + int result = dialog.run(); + if(result == Gtk::RESPONSE_YES) return save(index); + else if(result == Gtk::RESPONSE_NO) + return true; return false; }