From cf311f3e7904668b35d3cd854db82f64b48583e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20=27dreamsComeTrue=27=20Jasi=C5=84ski?= Date: Thu, 21 May 2020 14:50:35 +0200 Subject: [PATCH] Fix moving 2D node with mouse after using arrow keys Fixes: #38894 (cherry picked from commit 03b54f8a355b39d9cd3ccbf9358997319f8acc29) --- 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 1f3ab5d914a..ff1338c10c5 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -2165,7 +2165,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref &p_event) { return true; } - if (k.is_valid() && !k->is_pressed() && drag_type == DRAG_KEY_MOVE && tool == TOOL_SELECT && + if (k.is_valid() && !k->is_pressed() && drag_type == DRAG_KEY_MOVE && (tool == TOOL_SELECT || tool == TOOL_MOVE) && (k->get_scancode() == KEY_UP || k->get_scancode() == KEY_DOWN || k->get_scancode() == KEY_LEFT || k->get_scancode() == KEY_RIGHT)) { // Confirm canvas items move by arrow keys if ((!Input::get_singleton()->is_key_pressed(KEY_UP)) &&