mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-27 00:23:55 -06:00
Fixed resetting of object transformations / translations.
Fixes CURA-154
This commit is contained in:
parent
4d6528e90d
commit
3f580d97f9
1 changed files with 8 additions and 2 deletions
|
@ -337,7 +337,10 @@ class CuraApplication(QtApplication):
|
||||||
if nodes:
|
if nodes:
|
||||||
op = GroupedOperation()
|
op = GroupedOperation()
|
||||||
for node in nodes:
|
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()
|
op.push()
|
||||||
|
|
||||||
|
@ -358,7 +361,10 @@ class CuraApplication(QtApplication):
|
||||||
op = GroupedOperation()
|
op = GroupedOperation()
|
||||||
|
|
||||||
for node in nodes:
|
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()
|
op.push()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue