mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 13:39:00 +08:00
Fixed resetting of object transformations / translations.
Fixes CURA-154
This commit is contained in:
parent
4d6528e90d
commit
3f580d97f9
@ -337,7 +337,10 @@ class CuraApplication(QtApplication):
|
||||
if nodes:
|
||||
op = GroupedOperation()
|
||||
for node in nodes:
|
||||
op.addOperation(SetTransformOperation(node, Vector()))
|
||||
move_distance = node.getBoundingBox().center.y
|
||||
if move_distance <= 0:
|
||||
move_distance = -node.getBoundingBox().bottom
|
||||
op.addOperation(SetTransformOperation(node, Vector(0,move_distance,0)))
|
||||
|
||||
op.push()
|
||||
|
||||
@ -358,7 +361,10 @@ class CuraApplication(QtApplication):
|
||||
op = GroupedOperation()
|
||||
|
||||
for node in nodes:
|
||||
op.addOperation(SetTransformOperation(node, Vector(), Quaternion(), Vector(1, 1, 1)))
|
||||
move_distance = node.getBoundingBox().center.y
|
||||
if move_distance <= 0:
|
||||
move_distance = -node.getBoundingBox().bottom
|
||||
op.addOperation(SetTransformOperation(node, Vector(0,move_distance,0), Quaternion(), Vector(1, 1, 1)))
|
||||
|
||||
op.push()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user