UnsavedChangesDialog : improvements

* Added "Remember my choice" checkbox
* Center on the screen and set position in respect to the position of mainframe or settings dialog

Preferences : Added checkboxes for enable/suppress showing of the UnsavedChangeDialog

SearchImGui : close after parameter selection_is_changed_according_to_physical_printers

PhysicalPrinterDialog, SavePresetDialog : Center on the screen
This commit is contained in:
YuSanka 2020-10-15 16:48:48 +02:00 committed by Oleksandra Yushchenko
parent 650bbb3484
commit 00a7799341
12 changed files with 171 additions and 58 deletions

View file

@ -3099,7 +3099,7 @@ bool Tab::may_discard_current_dirty_preset(PresetCollection* presets /*= nullptr
if (presets == nullptr) presets = m_presets;
UnsavedChangesDialog dlg(m_type, presets, new_printer_name);
if (dlg.ShowModal() == wxID_CANCEL)
if (wxGetApp().app_config->get("default_action_on_select_preset") == "none" && dlg.ShowModal() == wxID_CANCEL)
return false;
if (dlg.save_preset()) // save selected changes
@ -3124,7 +3124,7 @@ bool Tab::may_discard_current_dirty_preset(PresetCollection* presets /*= nullptr
wxGetApp().plater()->force_filament_colors_update();
}
}
else if (dlg.move_preset()) // move selected changes
else if (dlg.transfer_changes()) // move selected changes
{
std::vector<std::string> selected_options = dlg.get_selected_options();
if (m_type == presets->type()) // move changes for the current preset from this tab