浏览代码

Merge pull request #36086 from KoBeWi/TOOL_MOVE_move

Allow to use arrow keys with TOOL_MOVE
Rémi Verschelde 5 年之前
父节点
当前提交
12244c46ae
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      editor/plugins/canvas_item_editor_plugin.cpp

+ 1 - 1
editor/plugins/canvas_item_editor_plugin.cpp

@@ -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