Browse Source

Allow to use arrow keys with TOOL_MOVE

(cherry picked from commit 18918b4efa7c8ea618cf48a2fce7d41165ce3549)
Tomasz Chabora 5 years ago
parent
commit
f0c89048d8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      editor/plugins/canvas_item_editor_plugin.cpp

+ 1 - 1
editor/plugins/canvas_item_editor_plugin.cpp

@@ -2077,7 +2077,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
 	}
 	}
 
 
 	// Move the canvas items with the arrow keys
 	// 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)) {
 			(k->get_scancode() == KEY_UP || k->get_scancode() == KEY_DOWN || k->get_scancode() == KEY_LEFT || k->get_scancode() == KEY_RIGHT)) {
 		if (!k->is_echo()) {
 		if (!k->is_echo()) {
 			// Start moving the canvas items with the keyboard
 			// Start moving the canvas items with the keyboard