D5: Added decorator

This commit is contained in:
Victor Larchenko 2016-11-27 14:05:25 +06:00 committed by Youness Alaoui
parent 002b3139e6
commit 4aa59950ca
7 changed files with 39 additions and 27 deletions

View file

@ -188,14 +188,18 @@ class CuraEngineBackend(Backend):
self._start_slice_job.start()
self._start_slice_job.finished.connect(self._onStartSliceCompleted)
_last_state = BackendState.NotStarted
def pauseSlicing(self):
self.close()
self.backendStateChange.emit(BackendState.SlicingDisabled)
def continueSlicing(self):
self.backendStateChange.emit(BackendState.NotStarted)
if self._last_state == BackendState.SlicingDisabled:
self.backendStateChange.emit(BackendState.NotStarted)
def _onBackendStateChanged(self, state):
self._last_state = state
if state == BackendState.SlicingDisabled:
self._pause_slicing = True
else:

View file

@ -60,6 +60,7 @@ class ProcessSlicedLayersJob(Job):
for node in DepthFirstIterator(self._scene.getRoot()):
if node.callDecoration("getLayerData"):
node.getParent().removeChild(node)
break
if self._abort_requested:
if self._progress:
self._progress.hide()