mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Use recursive check to add categories to list
CURA-2361
This commit is contained in:
parent
b43a5a7e31
commit
9a7057ce65
1 changed files with 5 additions and 8 deletions
|
@ -117,14 +117,11 @@ class SettingInheritanceManager(QObject):
|
|||
override = self._settingIsOverwritingInheritance(setting_key)
|
||||
if override:
|
||||
self._settings_with_inheritance_warning.append(setting_key)
|
||||
definitions = self._global_container_stack.getBottom().findDefinitions(key=setting_key)
|
||||
parent = definitions[0].parent
|
||||
if parent is not None and override:
|
||||
while parent.parent is not None:
|
||||
parent = parent.parent
|
||||
# Add the topmost container as well (if this wasn't already the case)
|
||||
if parent.key not in self._settings_with_inheritance_warning:
|
||||
self._settings_with_inheritance_warning.append(parent.key)
|
||||
|
||||
for category in self._global_container_stack.getBottom().findDefinitions(type = "category"):
|
||||
if self._recursiveCheck(category):
|
||||
self._settings_with_inheritance_warning.append(category.key)
|
||||
|
||||
self.settingsWithIntheritanceChanged.emit()
|
||||
|
||||
def _onGlobalContainerChanged(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue