From a672f0db171aa4a22fa62b9656a080bcb677d3fb Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Thu, 10 Feb 2022 04:02:02 -0600 Subject: [PATCH] [3.x] Fix CanvasItemEditor scale editor not using the editor methods --- editor/plugins/canvas_item_editor_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 1fda5598faf..25ed890ba23 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -2083,7 +2083,7 @@ bool CanvasItemEditor::_gui_input_scale(const Ref &p_event) { Point2 drag_to_local = simple_xform.xform(drag_to); Point2 offset = drag_to_local - drag_from_local; - Size2 scale = canvas_item->call("get_scale"); + Size2 scale = canvas_item->_edit_get_scale(); float ratio = scale.y / scale.x; if (drag_type == DRAG_SCALE_BOTH) { Size2 scale_factor = drag_to_local / drag_from_local; @@ -2114,7 +2114,7 @@ bool CanvasItemEditor::_gui_input_scale(const Ref &p_event) { scale.y = roundf(scale.y / snap_scale_step) * snap_scale_step; } - canvas_item->call("set_scale", scale); + canvas_item->_edit_set_scale(scale); return true; }