Merge branch '4.3' of ssh://github.com/Ultimaker/Cura into 4.3

This commit is contained in:
Ghostkeeper 2019-09-05 14:41:08 +02:00
commit 1e04a88859
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
2 changed files with 6 additions and 1 deletions

View file

@ -294,6 +294,11 @@ class FlavorParser:
extruder.getProperty("machine_nozzle_offset_y", "value")]
return result
#
# CURA-6643
# This function needs the filename so it can be set to the SceneNode. Otherwise, if you load a GCode file and press
# F5, that gcode SceneNode will be removed because it doesn't have a file to be reloaded from.
#
def processGCodeStream(self, stream: str, filename: str) -> Optional["CuraSceneNode"]:
Logger.log("d", "Preparing to load GCode")
self._cancelled = False

View file

@ -39,4 +39,4 @@ class UFPReader(MeshReader):
# Open the GCodeReader to parse the data
gcode_reader = PluginRegistry.getInstance().getPluginObject("GCodeReader") # type: ignore
gcode_reader.preReadFromStream(gcode_stream) # type: ignore
return gcode_reader.readFromStream(gcode_stream) # type: ignore
return gcode_reader.readFromStream(gcode_stream, file_name) # type: ignore