Fix potential concurrency of finishing before connected to finishing

This was a concurrency issue: If the slicing was very fast, it could finish slicing before the listener was connected to the message of being finished. Therefore, we should connect to being finished before we even start the start-slice job.

Contributes to issue CURA-1278.
This commit is contained in:
Ghostkeeper 2016-05-23 13:58:36 +02:00
parent 63bf5bec3d
commit eb951ed07c

View file

@ -155,8 +155,8 @@ class CuraEngineBackend(Backend):
self.slicingStarted.emit()
job = StartSliceJob.StartSliceJob(self._socket)
job.start()
job.finished.connect(self._onStartSliceCompleted)
job.start()
def _terminate(self):
self._slicing = False