mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Erase gcode of build plates that are determined to be empty
You don't want to start a new slice, but you should still erase the g-code there. Contributes to issue CURA-4525.
This commit is contained in:
parent
fefb20deb7
commit
a8ad956c92
1 changed files with 4 additions and 2 deletions
|
@ -206,12 +206,16 @@ class CuraEngineBackend(QObject, Backend):
|
|||
Logger.log("d", " ## Process layers job still busy, trying later")
|
||||
return
|
||||
|
||||
if not hasattr(self._scene, "gcode_list"):
|
||||
self._scene.gcode_list = {}
|
||||
|
||||
# see if we really have to slice
|
||||
active_build_plate = Application.getInstance().getBuildPlateModel().activeBuildPlate
|
||||
build_plate_to_be_sliced = self._build_plates_to_be_sliced.pop(0)
|
||||
Logger.log("d", "Going to slice build plate [%s]!" % build_plate_to_be_sliced)
|
||||
num_objects = self._numObjects()
|
||||
if build_plate_to_be_sliced not in num_objects or num_objects[build_plate_to_be_sliced] == 0:
|
||||
self._scene.gcode_list[build_plate_to_be_sliced] = []
|
||||
Logger.log("d", "Build plate %s has 0 objects to be sliced, skipping", build_plate_to_be_sliced)
|
||||
return
|
||||
|
||||
|
@ -229,8 +233,6 @@ class CuraEngineBackend(QObject, Backend):
|
|||
self.processingProgress.emit(0.0)
|
||||
self.backendStateChange.emit(BackendState.NotStarted)
|
||||
|
||||
if not hasattr(self._scene, "gcode_list"):
|
||||
self._scene.gcode_list = {}
|
||||
self._scene.gcode_list[build_plate_to_be_sliced] = [] #[] indexed by build plate number
|
||||
self._slicing = True
|
||||
self.slicingStarted.emit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue