Pressing inheritance button for category now makes all inherited children visible

CURA-2361
This commit is contained in:
Jaime van Kessel 2016-09-16 13:10:14 +02:00
parent 7793cb16d1
commit 132ed1d258
4 changed files with 23 additions and 5 deletions

View file

@ -22,6 +22,18 @@ class SettingInheritanceManager(QObject):
def test(self):
pass
## Get the keys of all children settings with an override.
@pyqtSlot(str, result = "QStringList")
def getChildrenKeysWithOverride(self, key):
definitions = self._global_container_stack.getBottom().findDefinitions(key=key)
if not definitions:
return
result = []
for key in definitions[0].getAllKeys():
if key in self._settings_with_inheritance_warning:
result.append(key)
return result
def _onActiveExtruderChanged(self):
if self._active_container_stack:
self._active_container_stack.propertyChanged.disconnect(self._onPropertyChanged)