Merge pull request #36086 from KoBeWi/TOOL_MOVE_move

Allow to use arrow keys with TOOL_MOVE
This commit is contained in:
Rémi Verschelde 2020-02-11 09:21:10 +01:00 committed by GitHub
commit 12244c46ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2108,7 +2108,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
}
// Move the canvas items with the arrow keys
if (k.is_valid() && k->is_pressed() && tool == TOOL_SELECT &&
if (k.is_valid() && k->is_pressed() && (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)) {
if (!k->is_echo()) {
// Start moving the canvas items with the keyboard