Fix of 1.42 beta crash when deleting printer profile created by configuration assistant #1985

Fixed an issue, where deleting a profile did not correctly update
profile dependences, and deleting a profile would not test dirty status
of depending profiles, which would be switched thus user changes would be lost.

Fixed enabling / disabling the --default FFF-- / --default SLA-- profiles
when deleting the last printer profile.

Little refactoring (don't compare by strings but by symbolic names).

Making a copy of a profile - "Copy" suffix is added to a system profile.
This commit is contained in:
bubnikv 2019-03-22 12:11:23 +01:00
parent bbb2a6d714
commit f5516f24c4
4 changed files with 79 additions and 44 deletions

View file

@ -239,7 +239,8 @@ public:
void load_current_preset();
void rebuild_page_tree();
void update_page_tree_visibility();
void select_preset(std::string preset_name = "");
// Select a new preset, possibly delete the current one.
void select_preset(std::string preset_name = "", bool delete_current = false);
bool may_discard_current_dirty_preset(PresetCollection* presets = nullptr, const std::string& new_printer_name = "");
bool may_switch_to_SLA_preset();