Resetting transformation now works again for ungrouped nodes

CURA-2925
This commit is contained in:
Jaime van Kessel 2016-11-18 12:50:51 +01:00
parent 2e1f4e3740
commit a71bb63318

View File

@ -799,11 +799,9 @@ class CuraApplication(QtApplication):
for node in nodes:
# Ensure that the object is above the build platform
node.removeDecorator(ZOffsetDecorator.ZOffsetDecorator)
center_y = 0
if node.callDecoration("isGroup"):
center_y = node.getWorldPosition().y - node.getBoundingBox().bottom
else:
center_y = node.getMeshData().getCenterPosition().y
op.addOperation(SetTransformOperation(node, Vector(0, center_y, 0), Quaternion(), Vector(1, 1, 1)))
op.push()