summaryrefslogtreecommitdiff
path: root/editor/plugins/canvas_item_editor_plugin.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-07-28 10:03:07 +0200
committerGitHub <noreply@github.com>2022-07-28 10:03:07 +0200
commit199ea349f5d6e561150c38480146d486ceae5ca0 (patch)
treef6fe9323b3d9535c56778beb7c4791124fa206a8 /editor/plugins/canvas_item_editor_plugin.cpp
parent72e9122514bafb2237dfed0815ffccadc97b10d0 (diff)
parent2bf9e6090c6d121bc1fddf4d82319a524ad0d963 (diff)
Merge pull request #57698 from bluenote10/feature/rename_translated_to_translated_local
Diffstat (limited to 'editor/plugins/canvas_item_editor_plugin.cpp')
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 82772178e0..19239b8650 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -2793,10 +2793,10 @@ void CanvasItemEditor::_draw_rulers() {
if (grid_snap_active || _is_grid_visible()) {
List<CanvasItem *> selection = _get_edited_canvas_items();
if (snap_relative && selection.size() > 0) {
- ruler_transform.translate(_get_encompassing_rect_from_list(selection).position);
+ ruler_transform.translate_local(_get_encompassing_rect_from_list(selection).position);
ruler_transform.scale_basis(grid_step * Math::pow(2.0, grid_step_multiplier));
} else {
- ruler_transform.translate(grid_offset);
+ ruler_transform.translate_local(grid_offset);
ruler_transform.scale_basis(grid_step * Math::pow(2.0, grid_step_multiplier));
}
while ((transform * ruler_transform).get_scale().x < 50 || (transform * ruler_transform).get_scale().y < 50) {