From d4fa1cee4587bae9268f0886f06d98d92fb3579f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 18 May 2021 11:07:02 +0200 Subject: [PATCH] Fix copying MIME type if scene nodes are copied We're not doing this in the nicest way possible... Contributes to issue CURA-8232. --- cura/CuraApplication.py | 1 + cura/Scene/CuraSceneNode.py | 1 + 2 files changed, 2 insertions(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 146da4a47c..1ff7932abb 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1867,6 +1867,7 @@ class CuraApplication(QtApplication): else: node = CuraSceneNode() node.setMeshData(original_node.getMeshData()) + node.source_mime_type = original_node.source_mime_type # Setting meshdata does not apply scaling. if original_node.getScale() != Vector(1.0, 1.0, 1.0): diff --git a/cura/Scene/CuraSceneNode.py b/cura/Scene/CuraSceneNode.py index 93a1511681..b299934278 100644 --- a/cura/Scene/CuraSceneNode.py +++ b/cura/Scene/CuraSceneNode.py @@ -142,6 +142,7 @@ class CuraSceneNode(SceneNode): copy.setTransformation(self.getLocalTransformation(copy= False)) copy.setMeshData(self._mesh_data) copy.setVisible(cast(bool, deepcopy(self._visible, memo))) + copy.source_mime_type = cast(str, deepcopy(self.source_mime_type, memo)) copy._selectable = cast(bool, deepcopy(self._selectable, memo)) copy._name = cast(str, deepcopy(self._name, memo)) for decorator in self._decorators: