From 4fc29554ef1a1bfe0da60165012615fbf832580e Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 25 Apr 2018 09:59:15 +0200 Subject: [PATCH] Don't process inheritance before there is an active global container This could be called after an extruder was disabled by a broken configuration. Fixes #3570. --- cura/Settings/SettingInheritanceManager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cura/Settings/SettingInheritanceManager.py b/cura/Settings/SettingInheritanceManager.py index e317b20f68..7cbfbcfda1 100644 --- a/cura/Settings/SettingInheritanceManager.py +++ b/cura/Settings/SettingInheritanceManager.py @@ -82,8 +82,9 @@ class SettingInheritanceManager(QObject): def _onActiveExtruderChanged(self): new_active_stack = ExtruderManager.getInstance().getActiveExtruderStack() - # if not new_active_stack: - # new_active_stack = self._global_container_stack + if not new_active_stack: + self._active_container_stack = None + return if new_active_stack != self._active_container_stack: # Check if changed if self._active_container_stack: # Disconnect signal from old container (if any) @@ -154,6 +155,8 @@ class SettingInheritanceManager(QObject): has_setting_function = False if not stack: stack = self._active_container_stack + if not stack: #No active container stack yet! + return False containers = [] ## Check if the setting has a user state. If not, it is never overwritten.