mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Clear out old gcode
This way if you move the model, and don't hit prepare again, you can end up exporting the old gcode again thinking its new gcode.
This commit is contained in:
parent
e74aa6dcc9
commit
1a050968a5
1 changed files with 3 additions and 0 deletions
|
@ -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: dict
|
||||
|
||||
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…
Add table
Add a link
Reference in a new issue