diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index 6ecb33fc78..a25604d165 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -85,6 +85,8 @@ class BuildVolume(SceneNode): ExtruderManager.getInstance().activeExtruderChanged.connect(self._onActiveExtruderStackChanged) self._onActiveExtruderStackChanged() + self._has_errors = False + def setWidth(self, width): if width: self._width = width @@ -316,10 +318,13 @@ class BuildVolume(SceneNode): if rebuild_me: self.rebuild() + def hasErrors(self): + return self._has_errors + def _updateDisallowedAreas(self): if not self._global_container_stack: return - + self._has_errors = False # Reset. disallowed_areas = copy.deepcopy( self._global_container_stack.getProperty("machine_disallowed_areas", "value")) areas = [] @@ -424,7 +429,7 @@ class BuildVolume(SceneNode): if not collision: areas.append(self._prime_tower_area) self._prime_tower_area = None - + self._has_errors = collision self._disallowed_areas = areas ## Convenience function to calculate the size of the bed adhesion in directions x, y. diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 4d40da899d..fc26bd086b 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -78,6 +78,10 @@ class StartSliceJob(Job): self.setResult(StartJobResult.SettingError) return + if Application.getInstance().getBuildVolume().hasErrors(): + self.setResult(StartJobResult.SettingError) + return + # Don't slice if there is a per object setting with an error value. for node in DepthFirstIterator(self._scene.getRoot()): if type(node) is not SceneNode or not node.isSelectable():