F5 reloads gcode file

CURA-6643
This commit is contained in:
Lipu Fei 2019-08-27 13:38:42 +02:00
parent 867a881de9
commit 946b2b943e
5 changed files with 33 additions and 7 deletions

View file

@ -292,7 +292,7 @@ class FlavorParser:
extruder.getProperty("machine_nozzle_offset_y", "value")]
return result
def processGCodeStream(self, stream: str) -> Optional[CuraSceneNode]:
def processGCodeStream(self, stream: str, filename: str) -> Optional[CuraSceneNode]:
Logger.log("d", "Preparing to load GCode")
self._cancelled = False
# We obtain the filament diameter from the selected extruder to calculate line widths
@ -453,6 +453,7 @@ class FlavorParser:
scene_node.addDecorator(decorator)
gcode_list_decorator = GCodeListDecorator()
gcode_list_decorator.setGcodeFileName(filename)
gcode_list_decorator.setGCodeList(gcode_list)
scene_node.addDecorator(gcode_list_decorator)