Check unsaved preset changes only if project is dirty and it wasn't saved

This commit is contained in:
YuSanka 2021-10-04 16:20:46 +02:00
parent d214e09400
commit 577632d892

View file

@ -228,7 +228,7 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_S
return;
}
// check unsaved changes only if project wasn't saved
else if (saved_project == wxID_NO && event.CanVeto() &&
else if (plater()->is_project_dirty() && saved_project == wxID_NO && event.CanVeto() &&
!wxGetApp().check_and_save_current_preset_changes(_L("PrusaSlicer is closing"), _L("Closing PrusaSlicer while some presets are modified."))) {
event.Veto();
return;