Merge pull request #4073 from Ultimaker/CURA-5572_fix_gcode_reader

CURA-5572 Update the scene when a Gcode is loaded.
This commit is contained in:
Lipu Fei 2018-07-16 08:07:02 +02:00 committed by GitHub
commit 9856ccf700
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -1562,7 +1562,7 @@ class CuraApplication(QtApplication):
self.callLater(self.openProjectFile.emit, file) self.callLater(self.openProjectFile.emit, file)
return return
if Preferences.getInstance().getValue("cura/select_models_on_load"): if self.getPreferences().getValue("cura/select_models_on_load"):
Selection.clear() Selection.clear()
f = file.toLocalFile() f = file.toLocalFile()
@ -1619,7 +1619,7 @@ class CuraApplication(QtApplication):
default_extruder_position = self.getMachineManager().defaultExtruderPosition default_extruder_position = self.getMachineManager().defaultExtruderPosition
default_extruder_id = self._global_container_stack.extruders[default_extruder_position].getId() default_extruder_id = self._global_container_stack.extruders[default_extruder_position].getId()
select_models_on_load = Preferences.getInstance().getValue("cura/select_models_on_load") select_models_on_load = self.getPreferences().getValue("cura/select_models_on_load")
for original_node in nodes: for original_node in nodes:

View file

@ -488,7 +488,7 @@ class CuraEngineBackend(QObject, Backend):
# we got a single scenenode # we got a single scenenode
if not source.callDecoration("isGroup"): if not source.callDecoration("isGroup"):
mesh_data = source.getMeshData() mesh_data = source.getMeshData()
if mesh_data and mesh_data.getVertices() is None: if mesh_data is None or mesh_data.getVertices() is None:
return return
# There are some SceneNodes that do not have any build plate associated, then do not add to the list. # There are some SceneNodes that do not have any build plate associated, then do not add to the list.