diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index 2a84675a48..4007ee0007 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -37,10 +37,8 @@ class BuildVolume(SceneNode): self.setCalculateBoundingBox(False) - self._active_profile = None - self._active_instance = None - Application.getInstance().activeContainerStackChanged.connect(self._onActiveContainerStackChanged) - self._onActiveContainerStackChanged() + Application.getInstance().globalContainerStackChanged.connect(self._onGlobalContainerStackChanged) + self._onGlobalContainerStackChanged() def setWidth(self, width): if width: self._width = width @@ -159,7 +157,7 @@ class BuildVolume(SceneNode): Application.getInstance().getController().getScene()._maximum_bounds = scale_to_max_bounds - def _onActiveContainerStackChanged(self): + def _onGlobalContainerStackChanged(self): self._active_container_stack = Application.getInstance().getGlobalContainerStack() if self._active_container_stack: diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 1f83cd1f3d..fe250aea16 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -101,7 +101,7 @@ class CuraApplication(QtApplication): self._camera_animation = None self._cura_actions = None - #self.getMachineManager().activeMachineInstanceChanged.connect(self._onActiveMachineChanged) + #self.getMachineManager().activeMachineInstanceChanged.connect(self._onGlobalContainerStackChanged) #self.getMachineManager().addMachineRequested.connect(self._onAddMachineRequested) self.getController().getScene().sceneChanged.connect(self.updatePlatformActivity) self.getController().toolOperationStopped.connect(self._onToolOperationStopped) @@ -508,10 +508,9 @@ class CuraApplication(QtApplication): @pyqtSlot(str, result = "QVariant") def getSettingValue(self, key): - if not self.getMachineManager().getWorkingProfile(): + if not self._global_container_stack: return None - return self.getMachineManager().getWorkingProfile().getSettingValue(key) - #return self.getActiveMachine().getSettingValueByKey(key) + return self._global_container_stack.getValue(key) ## Change setting by key value pair @pyqtSlot(str, "QVariant")