Skip to content

Commit

Permalink
Use getWorldPosition for TranslateOperation
Browse files Browse the repository at this point in the history
  • Loading branch information
casperlamboo committed Dec 6, 2023
1 parent 9a108dc commit 0353037
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cura/Arranging/GridArrange.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,8 @@ def _moveNodeOnGrid(self, node: "SceneNode", grid_x: int, grid_y: int) -> "Opera
center_grid_x = coord_grid_x + (0.5 * self._grid_width)
center_grid_y = coord_grid_y + (0.5 * self._grid_height)

bounding_box = node.getBoundingBox()
center_node_z = bounding_box.height / 2

return TranslateOperation(node, Vector(center_grid_x, center_node_z, center_grid_y), set_position = True)
return TranslateOperation(node, Vector(center_grid_x, node.getWorldPosition().y, center_grid_y),
set_position=True)

def _getGridCornerPoints(
self,
Expand Down

0 comments on commit 0353037

Please sign in to comment.