Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenricoturri1966 <enricoturri@seznam.cz>2021-06-08 12:51:41 +0300
committerenricoturri1966 <enricoturri@seznam.cz>2021-06-08 12:51:41 +0300
commit5bbc68df7b6dd0ecdf7c8f24906b203bdfd4f055 (patch)
tree5433284f08f346567bf0d5f8cf213c45e3bfe91f /src/slic3r/GUI/MainFrame.cpp
parent1c35dfe59175cbc3221d54dc2af20d57ad0f9494 (diff)
Do not close application when user select 'Cancel' in the save dirty project dialog
Diffstat (limited to 'src/slic3r/GUI/MainFrame.cpp')
-rw-r--r--src/slic3r/GUI/MainFrame.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp
index f46408738..5a9e5d43a 100644
--- a/src/slic3r/GUI/MainFrame.cpp
+++ b/src/slic3r/GUI/MainFrame.cpp
@@ -213,8 +213,10 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_S
return;
}
- if (m_plater != nullptr)
- m_plater->save_project_if_dirty();
+ if (m_plater != nullptr && !m_plater->save_project_if_dirty()) {
+ event.Veto();
+ return;
+ }
if (event.CanVeto() && !wxGetApp().check_and_save_current_preset_changes()) {
#else