mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 17:48:59 +08:00
Ensure that the SettingVisibilityPresetsModel doesn't have duplicated settings
CURA-5734
This commit is contained in:
parent
fc9f05fc8b
commit
7e7afa7c06
@ -81,7 +81,8 @@ class SettingVisibilityPresetsModel(QObject):
|
||||
# Sort them on weight (and if that fails, use ID)
|
||||
items.sort(key = lambda k: (int(k.weight), k.id))
|
||||
|
||||
self.setItems(items)
|
||||
# Set items and ensure there are no duplicated values
|
||||
self.setItems(list(set(items)))
|
||||
|
||||
@pyqtProperty("QVariantList", notify = onItemsChanged)
|
||||
def items(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user