Fix for  - "Save Project" command doesn't work properly
This commit is contained in:
Vojtech Bubnik 2022-02-14 14:13:41 +01:00
parent 14b7d36070
commit a062a889d8
9 changed files with 37 additions and 22 deletions
src/slic3r/GUI

View file

@ -1283,11 +1283,13 @@ bool GUI_App::on_init_inner()
else
load_current_presets();
// set saved presets for initial project
// Save the active profiles as a "saved into project".
update_saved_preset_from_current_preset();
if (plater_ != nullptr) {
// Save the names of active presets and project specific config into ProjectDirtyStateManager.
plater_->reset_project_dirty_initial_presets();
// Update Project dirty state, update application title bar.
plater_->update_project_dirty_from_presets();
}
@ -2484,16 +2486,13 @@ void GUI_App::update_saved_preset_from_current_preset()
}
}
std::vector<std::pair<unsigned int, std::string>> GUI_App::get_selected_presets() const
std::vector<const PresetCollection*> GUI_App::get_active_preset_collections() const
{
std::vector<std::pair<unsigned int, std::string>> ret;
std::vector<const PresetCollection*> ret;
PrinterTechnology printer_technology = preset_bundle->printers.get_edited_preset().printer_technology();
for (Tab* tab : tabs_list) {
if (tab->supports_printer_technology(printer_technology)) {
const PresetCollection* presets = tab->get_presets();
ret.push_back({ static_cast<unsigned int>(presets->type()), presets->get_selected_preset_name() });
}
}
for (const Tab* tab : tabs_list)
if (tab->supports_printer_technology(printer_technology))
ret.push_back(tab->get_presets());
return ret;
}