diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index 2710aad91e..8fffac4501 100755 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -173,15 +173,11 @@ class PlatformPhysics: if tool.getPluginId() == "TranslateTool": for node in Selection.getAllSelectedObjects(): - bounding_box = node.getBoundingBox() - if bounding_box is None: - continue - - if bounding_box.bottom < 0: + if node.getBoundingBox().bottom < 0: if not node.getDecorator(ZOffsetDecorator.ZOffsetDecorator): node.addDecorator(ZOffsetDecorator.ZOffsetDecorator()) - node.callDecoration("setZOffset", bounding_box.bottom) + node.callDecoration("setZOffset", node.getBoundingBox().bottom) else: if node.getDecorator(ZOffsetDecorator.ZOffsetDecorator): node.removeDecorator(ZOffsetDecorator.ZOffsetDecorator)