From c2b6a900fcb7db4645a8b94998c6257c5d82978c Mon Sep 17 00:00:00 2001 From: groud Date: Mon, 5 Nov 2018 23:31:57 +0100 Subject: Fixes uniform scaling weird behavior --- editor/plugins/canvas_item_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 31dd20e453..bb3ae1dac9 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -1696,7 +1696,7 @@ bool CanvasItemEditor::_gui_input_scale(const Ref &p_event) { if (drag_type == DRAG_SCALE_BOTH) { Size2 scale_factor = drag_to_local / drag_from_local; if (uniform) { - if (ABS(offset.x) > ABS(offset.y)) { + if (ABS(scale_factor.x - 1.0) > ABS(scale_factor.y - 1.0)) { scale.x *= scale_factor.x; scale.y = scale.x * ratio; } else { -- cgit v1.2.3