From e08af90c9081dac736c727fe218542b02a0509f5 Mon Sep 17 00:00:00 2001 From: Nick Swoboda Date: Wed, 9 Dec 2020 16:47:12 -0800 Subject: [PATCH] Fix scene being modified when arrows are pressed with no node selected (cherry picked from commit 66827337fdd46447b687124b5c3be4a0417f35c6) --- 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 9d61ed18a94..4715ff41059 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -2268,12 +2268,12 @@ bool CanvasItemEditor::_gui_input_move(const Ref &p_event) { (!Input::get_singleton()->is_key_pressed(KEY_DOWN)) && (!Input::get_singleton()->is_key_pressed(KEY_LEFT)) && (!Input::get_singleton()->is_key_pressed(KEY_RIGHT))) { - if (drag_selection.size() != 1) { + if (drag_selection.size() > 1) { _commit_canvas_item_state( drag_selection, vformat(TTR("Move %d CanvasItems"), drag_selection.size()), true); - } else { + } else if (drag_selection.size() == 1) { _commit_canvas_item_state( drag_selection, vformat(TTR("Move CanvasItem \"%s\" to (%d, %d)"),