Check unsaved preset changes only when presets have been changed in the project

This commit is contained in:
YuSanka 2021-11-19 16:33:15 +01:00
parent 55a555c848
commit 244b66649c
4 changed files with 5 additions and 1 deletions

View file

@ -229,7 +229,7 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_S
}
// check unsaved changes only if project wasn't saved
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."))) {
(plater()->is_presets_dirty() && !wxGetApp().check_and_save_current_preset_changes(_L("PrusaSlicer is closing"), _L("Closing PrusaSlicer while some presets are modified.")))) {
event.Veto();
return;
}