mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 06:48:58 +08:00
Merge pull request #4185 from Ultimaker/clear_out_old_gcode
Clear out old gcode
This commit is contained in:
commit
d8abf8f470
@ -541,6 +541,9 @@ class CuraEngineBackend(QObject, Backend):
|
||||
|
||||
## Remove old layer data (if any)
|
||||
def _clearLayerData(self, build_plate_numbers: Set = None) -> None:
|
||||
# Clear out any old gcode
|
||||
self._scene.gcode_dict = {} # type: ignore
|
||||
|
||||
for node in DepthFirstIterator(self._scene.getRoot()): #type: ignore #Ignore type error because iter() should get called automatically by Python syntax.
|
||||
if node.callDecoration("getLayerData"):
|
||||
if not build_plate_numbers or node.callDecoration("getBuildPlateNumber") in build_plate_numbers:
|
||||
|
Loading…
x
Reference in New Issue
Block a user