Don't copy transformations if it's not needed

CURA=7106
This commit is contained in:
Jaime van Kessel 2020-06-23 16:24:34 +02:00
parent ac0c0d0698
commit b0ed47daf1
No known key found for this signature in database
GPG key ID: 3710727397403C91
5 changed files with 7 additions and 7 deletions

View file

@ -118,7 +118,7 @@ class CuraSceneNode(SceneNode):
self._aabb = None
if self._mesh_data:
self._aabb = self._mesh_data.getExtents(self.getWorldTransformation())
self._aabb = self._mesh_data.getExtents(self.getWorldTransformation(copy = False))
else: # If there is no mesh_data, use a bounding box that encompasses the local (0,0,0)
position = self.getWorldPosition()
self._aabb = AxisAlignedBox(minimum = position, maximum = position)
@ -139,7 +139,7 @@ class CuraSceneNode(SceneNode):
"""Taken from SceneNode, but replaced SceneNode with CuraSceneNode"""
copy = CuraSceneNode(no_setting_override = True) # Setting override will be added later
copy.setTransformation(self.getLocalTransformation())
copy.setTransformation(self.getLocalTransformation(copy= False))
copy.setMeshData(self._mesh_data)
copy.setVisible(cast(bool, deepcopy(self._visible, memo)))
copy._selectable = cast(bool, deepcopy(self._selectable, memo))