mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-14 06:23:16 +08:00
Use recursive check to add categories to list
CURA-2361
This commit is contained in:
parent
b43a5a7e31
commit
9a7057ce65
@ -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…
x
Reference in New Issue
Block a user