Add "all" as a setting visibility preset

CURA-7082
This commit is contained in:
Jaime van Kessel 2020-01-02 10:51:40 +01:00
parent 1915100118
commit 8b393317ff
No known key found for this signature in database
GPG key ID: 3710727397403C91
4 changed files with 12 additions and 26 deletions

View file

@ -77,6 +77,10 @@ class SettingVisibilityPresetsModel(QObject):
items.append(setting_visibility_preset)
# Add the "all" visibility:
all_setting_visibility_preset = SettingVisibilityPreset(preset_id = "all", name = "All", weight = 9001)
all_setting_visibility_preset.setSettings(list(CuraApplication.getInstance().getMachineManager().getAllSettingKeys()))
items.append(all_setting_visibility_preset)
# Sort them on weight (and if that fails, use ID)
items.sort(key = lambda k: (int(k.weight), k.presetId))