mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
Fix: The "Unsaved Changes Dialog" pops up, but the content display section is empty. (#7482)
fix:The Unsaved Changes Dialog pops up, but the content display section is empty.
This commit is contained in:
parent
449785e138
commit
2a61ceae5b
2 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
{
|
||||
|
|
|
@ -312,6 +312,8 @@ public:
|
|||
{
|
||||
}
|
||||
};
|
||||
public:
|
||||
int getUpdateItemCount() { return m_presetitems.size(); }
|
||||
|
||||
private:
|
||||
std::vector<PresetItem> m_presetitems;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue