From ed71887e352cd3ac7f1b1e42d8fafedfd967850e Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 7 Apr 2022 17:45:52 +0200 Subject: [PATCH] Fix for #8122 - When you change setting with a blank project and go to exit it will ask you to save blank project, if you don't "save", prusa slicer wont' shut down and #8076 - PrusaSlicer-2.4.1 does not close with no 3D-Model loaded and unsafed --- src/slic3r/GUI/Plater.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 369e8ca268..0f864a6ac7 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -1746,8 +1746,11 @@ struct Plater::priv res = (act == "1") ? wxID_YES : wxID_NO; if (res == wxID_YES) - if (!mainframe->save_project_as(project_name)) - res = wxID_CANCEL; + if (!mainframe->save_project_as(project_name)) { + // Return Cancel only, when we don't remember a choice for closing the application. + // Elsewhere it can causes an impossibility to close the application at all. + res = act.empty() ? wxID_CANCEL : wxID_NO; + } } } return res;