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
This commit is contained in:
YuSanka 2022-04-07 17:45:52 +02:00 committed by Lukas Matena
parent a248490507
commit ed71887e35

View File

@ -1746,8 +1746,11 @@ struct Plater::priv
res = (act == "1") ? wxID_YES : wxID_NO; res = (act == "1") ? wxID_YES : wxID_NO;
if (res == wxID_YES) if (res == wxID_YES)
if (!mainframe->save_project_as(project_name)) if (!mainframe->save_project_as(project_name)) {
res = wxID_CANCEL; // 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; return res;