mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Fix crash when moving the support eraser
CURA-6480
This commit is contained in:
parent
1b9bf6f0b9
commit
3a195e9678
1 changed files with 6 additions and 2 deletions
|
@ -173,11 +173,15 @@ class PlatformPhysics:
|
|||
|
||||
if tool.getPluginId() == "TranslateTool":
|
||||
for node in Selection.getAllSelectedObjects():
|
||||
if node.getBoundingBox().bottom < 0:
|
||||
bounding_box = node.getBoundingBox()
|
||||
if bounding_box is None:
|
||||
continue
|
||||
|
||||
if bounding_box.bottom < 0:
|
||||
if not node.getDecorator(ZOffsetDecorator.ZOffsetDecorator):
|
||||
node.addDecorator(ZOffsetDecorator.ZOffsetDecorator())
|
||||
|
||||
node.callDecoration("setZOffset", node.getBoundingBox().bottom)
|
||||
node.callDecoration("setZOffset", bounding_box.bottom)
|
||||
else:
|
||||
if node.getDecorator(ZOffsetDecorator.ZOffsetDecorator):
|
||||
node.removeDecorator(ZOffsetDecorator.ZOffsetDecorator)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue