Don't crash on moving empty groups down to build plate

Empty groups don't have a bounding box. I don't know how an empty group could've gotten there but maybe there is something happening with a plug-in or something.

Fixes Sentry issue CURA-FM.
This commit is contained in:
Ghostkeeper 2020-04-07 13:16:48 +02:00
parent 95b5a176b8
commit ea31d9d41b
No known key found for this signature in database
GPG Key ID: D2A8871EE34EC59A

View File

@ -181,7 +181,7 @@ class PlatformPhysics:
if tool.getPluginId() == "TranslateTool":
for node in Selection.getAllSelectedObjects():
if node.getBoundingBox().bottom < 0:
if node.getBoundingBox() and node.getBoundingBox().bottom < 0:
if not node.getDecorator(ZOffsetDecorator.ZOffsetDecorator):
node.addDecorator(ZOffsetDecorator.ZOffsetDecorator())