mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 01:37:51 -06:00
Ensure that the SettingVisibilityPresetsModel doesn't have duplicated settings
CURA-5734
This commit is contained in:
parent
fc9f05fc8b
commit
7e7afa7c06
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue