mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
Fix of switching the default print / filament / sla print / sla material
profiles after switching the technology from FFF to SLA and vice versa. The solution is to keep the print / filament / sla print / sla material settings undefined until the particular technology is activated for the first time. Then the settings name persists indefinitely even if all the printes for that particular printer technology are deleted.
This commit is contained in:
@@ -820,6 +820,9 @@ void PresetCollection::load_bitmap_add(wxWindow *window, const std::string &file
|
||||
|
||||
const Preset* PresetCollection::get_selected_preset_parent() const
|
||||
{
|
||||
if (this->get_selected_idx() == -1)
|
||||
// This preset collection has no preset activated yet. Only the get_edited_preset() is valid.
|
||||
return nullptr;
|
||||
const std::string &inherits = this->get_edited_preset().inherits();
|
||||
if (inherits.empty())
|
||||
return this->get_selected_preset().is_system ? &this->get_selected_preset() : nullptr;
|
||||
|
||||
Reference in New Issue
Block a user