mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Layer processing is now only done when no slicing is occuring.
Contributes to CURA-693
This commit is contained in:
parent
ffa87a9302
commit
0b920950d4
2 changed files with 6 additions and 1 deletions
|
@ -134,6 +134,7 @@ class CuraEngineBackend(Backend):
|
||||||
|
|
||||||
self._scene.gcode_list = []
|
self._scene.gcode_list = []
|
||||||
self._slicing = True
|
self._slicing = True
|
||||||
|
self.slicingStarted.emit()
|
||||||
|
|
||||||
job = StartSliceJob.StartSliceJob(self._profile, self._socket)
|
job = StartSliceJob.StartSliceJob(self._profile, self._socket)
|
||||||
job.start()
|
job.start()
|
||||||
|
@ -142,6 +143,7 @@ class CuraEngineBackend(Backend):
|
||||||
def _terminate(self):
|
def _terminate(self):
|
||||||
self._slicing = False
|
self._slicing = False
|
||||||
self._restart = True
|
self._restart = True
|
||||||
|
self.slicingCancelled.emit()
|
||||||
if self._process is not None:
|
if self._process is not None:
|
||||||
Logger.log("d", "Killing engine process")
|
Logger.log("d", "Killing engine process")
|
||||||
try:
|
try:
|
||||||
|
@ -259,7 +261,9 @@ class CuraEngineBackend(Backend):
|
||||||
view = Application.getInstance().getController().getActiveView()
|
view = Application.getInstance().getController().getActiveView()
|
||||||
if view.getPluginId() == "LayerView":
|
if view.getPluginId() == "LayerView":
|
||||||
self._layer_view_active = True
|
self._layer_view_active = True
|
||||||
if self._stored_layer_data:
|
# There is data and we're not slicing at the moment
|
||||||
|
# if we are slicing, there is no need to re-calculate the data as it will be invalid in a moment.
|
||||||
|
if self._stored_layer_data and not self._slicing:
|
||||||
job = ProcessSlicedObjectListJob.ProcessSlicedObjectListJob(self._stored_layer_data)
|
job = ProcessSlicedObjectListJob.ProcessSlicedObjectListJob(self._stored_layer_data)
|
||||||
job.start()
|
job.start()
|
||||||
self._stored_layer_data = None
|
self._stored_layer_data = None
|
||||||
|
|
|
@ -29,6 +29,7 @@ class ProcessSlicedObjectListJob(Job):
|
||||||
if Application.getInstance().getController().getActiveView().getPluginId() == "LayerView":
|
if Application.getInstance().getController().getActiveView().getPluginId() == "LayerView":
|
||||||
self._progress = Message(catalog.i18nc("@info:status", "Processing Layers"), 0, False, -1)
|
self._progress = Message(catalog.i18nc("@info:status", "Processing Layers"), 0, False, -1)
|
||||||
self._progress.show()
|
self._progress.show()
|
||||||
|
Job.yieldThread()
|
||||||
|
|
||||||
Application.getInstance().getController().activeViewChanged.connect(self._onActiveViewChanged)
|
Application.getInstance().getController().activeViewChanged.connect(self._onActiveViewChanged)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue