Fix moving 2D node with mouse after using arrow keys

Fixes: #38894
parent 92394120
...@@ -2240,7 +2240,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) { ...@@ -2240,7 +2240,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
return true; 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_keycode() == KEY_UP || k->get_keycode() == KEY_DOWN || k->get_keycode() == KEY_LEFT || k->get_keycode() == KEY_RIGHT)) { (k->get_keycode() == KEY_UP || k->get_keycode() == KEY_DOWN || k->get_keycode() == KEY_LEFT || k->get_keycode() == KEY_RIGHT)) {
// Confirm canvas items move by arrow keys // Confirm canvas items move by arrow keys
if ((!Input::get_singleton()->is_key_pressed(KEY_UP)) && if ((!Input::get_singleton()->is_key_pressed(KEY_UP)) &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment