mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 17:27:51 -06:00
Fix visibilty preset update
CURA-5088
This commit is contained in:
parent
90fa49b6a1
commit
f0dc138b37
2 changed files with 7 additions and 12 deletions
|
@ -165,14 +165,18 @@ class SettingVisibilityPresetsModel(ListModel):
|
|||
matching_preset_item = item
|
||||
break
|
||||
|
||||
item_to_set = self._active_preset_item
|
||||
if matching_preset_item is None:
|
||||
# The new visibility setup is "custom" should be custom
|
||||
if self._active_preset_item["id"] == "custom":
|
||||
# We are already in custom, just save the settings
|
||||
self._preferences.setValue("cura/custom_visible_settings", visibility_string)
|
||||
else:
|
||||
self._active_preset_item = self.items[0] # 0 is custom
|
||||
self.activePresetChanged.emit()
|
||||
item_to_set = self.items[0] # 0 is custom
|
||||
else:
|
||||
self._active_preset_item = matching_preset_item
|
||||
item_to_set = matching_preset_item
|
||||
|
||||
if self._active_preset_item is None or self._active_preset_item["id"] != item_to_set["id"]:
|
||||
self._active_preset_item = item_to_set
|
||||
self._preferences.setValue("cura/active_setting_visibility_preset", self._active_preset_item["id"])
|
||||
self.activePresetChanged.emit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue