diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index fd25e344e4..42ec6886f7 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -110,6 +110,9 @@ class BuildVolume(SceneNode): per_mesh_stack = node.callDecoration("getStack") if per_mesh_stack: per_mesh_stack.propertyChanged.disconnect(self._onSettingPropertyChanged) + active_extruder_changed = node.callDecoration("getActiveExtruderChangedSignal") + if active_extruder_changed is not None: + node.callDecoration("getActiveExtruderChangedSignal").disconnect(self._updateDisallowedAreas) node.decoratorsChanged.disconnect(self._onNodeDecoratorChanged) self._scene_objects = new_scene_objects @@ -122,6 +125,10 @@ class BuildVolume(SceneNode): per_mesh_stack = node.callDecoration("getStack") if per_mesh_stack: per_mesh_stack.propertyChanged.connect(self._onSettingPropertyChanged) + active_extruder_changed = node.callDecoration("getActiveExtruderChangedSignal") + if active_extruder_changed is not None: + active_extruder_changed.connect(self._updateDisallowedAreas) + self._updateDisallowedAreas() def setWidth(self, width): if width: self._width = width diff --git a/cura/Settings/SettingOverrideDecorator.py b/cura/Settings/SettingOverrideDecorator.py index a8cfcd8d80..d38dac565b 100644 --- a/cura/Settings/SettingOverrideDecorator.py +++ b/cura/Settings/SettingOverrideDecorator.py @@ -61,6 +61,12 @@ class SettingOverrideDecorator(SceneNodeDecorator): def getActiveExtruder(self): return self._extruder_stack + ## Gets the signal that emits if the active extruder changed. + # + # This can then be accessed via a decorator. + def getActiveExtruderChangedSignal(self): + return self.activeExtruderChanged + ## Gets the currently active extruders position # # \return An extruder's position, or None if no position info is available.