Fix crash loading almost empty project. Added return value to functions in SettingInheritanceManager

This commit is contained in:
Jack Ha 2016-12-13 16:03:26 +01:00
parent 88f73d881c
commit 4085cfe67e

View file

@ -32,7 +32,7 @@ class SettingInheritanceManager(QObject):
def getChildrenKeysWithOverride(self, key): def getChildrenKeysWithOverride(self, key):
definitions = self._global_container_stack.getBottom().findDefinitions(key=key) definitions = self._global_container_stack.getBottom().findDefinitions(key=key)
if not definitions: if not definitions:
return return []
result = [] result = []
for key in definitions[0].getAllKeys(): for key in definitions[0].getAllKeys():
if key in self._settings_with_inheritance_warning: if key in self._settings_with_inheritance_warning:
@ -51,7 +51,7 @@ class SettingInheritanceManager(QObject):
definitions = self._global_container_stack.getBottom().findDefinitions(key=key) definitions = self._global_container_stack.getBottom().findDefinitions(key=key)
if not definitions: if not definitions:
return return []
result = [] result = []
for key in definitions[0].getAllKeys(): for key in definitions[0].getAllKeys():
if self._settingIsOverwritingInheritance(key, extruder): if self._settingIsOverwritingInheritance(key, extruder):