From 5bbc68df7b6dd0ecdf7c8f24906b203bdfd4f055 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Tue, 8 Jun 2021 11:51:41 +0200 Subject: [PATCH] Do not close application when user select 'Cancel' in the save dirty project dialog --- src/slic3r/GUI/MainFrame.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index f464087388..5a9e5d43a5 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