Fixed resetting of object transformations / translations.

Fixes CURA-154
This commit is contained in:
Jaime van Kessel 2015-09-14 13:37:10 +02:00
parent 4d6528e90d
commit 3f580d97f9

View file

@ -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()