From 01a26b0360f199b9227b9bd97db471eec18565bc Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Fri, 13 Jul 2018 16:05:13 +0200 Subject: [PATCH] CURA-5572 The scene was not updated when a Gcode was loaded. This fixes a bug that we introduced when fixing code style. This was a bad translation. --- cura/CuraApplication.py | 4 ++-- plugins/CuraEngineBackend/CuraEngineBackend.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 087f081ae9..3f0a5b9cb2 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1562,7 +1562,7 @@ class CuraApplication(QtApplication): self.callLater(self.openProjectFile.emit, file) return - if Preferences.getInstance().getValue("cura/select_models_on_load"): + if self.getPreferences().getValue("cura/select_models_on_load"): Selection.clear() f = file.toLocalFile() @@ -1619,7 +1619,7 @@ class CuraApplication(QtApplication): default_extruder_position = self.getMachineManager().defaultExtruderPosition 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: diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 9aff42a9e1..c1ca2448ce 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -488,7 +488,7 @@ class CuraEngineBackend(QObject, Backend): # we got a single scenenode if not source.callDecoration("isGroup"): 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 # There are some SceneNodes that do not have any build plate associated, then do not add to the list.