diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 4415118af5..aedbea2c07 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -5647,7 +5647,8 @@ bool GUI_App::check_and_keep_current_preset_changes(const wxString& caption, con bool is_called_from_configwizard = postponed_apply_of_keeped_changes != nullptr; UnsavedChangesDialog dlg(caption, header, "", action_buttons); - if (dlg.ShowModal() == wxID_CANCEL) + bool no_need_change = dlg.getUpdateItemCount() == 0 ? true : false; + if (!no_need_change && dlg.ShowModal() == wxID_CANCEL) return false; auto reset_modifications = [this, is_called_from_configwizard]() { @@ -5662,7 +5663,7 @@ bool GUI_App::check_and_keep_current_preset_changes(const wxString& caption, con load_current_presets(false); }; - if (dlg.discard()) + if (dlg.discard() || no_need_change) reset_modifications(); else // save selected changes { diff --git a/src/slic3r/GUI/UnsavedChangesDialog.hpp b/src/slic3r/GUI/UnsavedChangesDialog.hpp index f91fa844f4..c6dbd20505 100644 --- a/src/slic3r/GUI/UnsavedChangesDialog.hpp +++ b/src/slic3r/GUI/UnsavedChangesDialog.hpp @@ -312,6 +312,8 @@ public: { } }; +public: + int getUpdateItemCount() { return m_presetitems.size(); } private: std::vector m_presetitems;