CURA-4772 Create a CuraSceneNode instead of a SceneNode when reading a

GCode. Avoid creating an empty CuraSceneNode if the node is already an
instance of it.
This commit is contained in:
Diego Prado Gesto 2018-01-09 09:16:21 +01:00
parent 42b232756e
commit 4c8c4c78da
3 changed files with 8 additions and 6 deletions

View file

@ -1432,7 +1432,9 @@ class CuraApplication(QtApplication):
target_build_plate = self.getBuildPlateModel().activeBuildPlate if arrange_objects_on_load else -1
for original_node in nodes:
node = CuraSceneNode() # We want our own CuraSceneNode
# Create a CuraSceneNode just if the original node is not that type
node = original_node if isinstance(original_node, CuraSceneNode) else CuraSceneNode()
node.setMeshData(original_node.getMeshData())
node.setSelectable(True)