Fix scene being modified when arrows are pressed with no node selected
(cherry picked from commit 66827337fd
)
This commit is contained in:
parent
de7b5006cc
commit
e08af90c90
1 changed files with 2 additions and 2 deletions
|
@ -2268,12 +2268,12 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
|
||||||
(!Input::get_singleton()->is_key_pressed(KEY_DOWN)) &&
|
(!Input::get_singleton()->is_key_pressed(KEY_DOWN)) &&
|
||||||
(!Input::get_singleton()->is_key_pressed(KEY_LEFT)) &&
|
(!Input::get_singleton()->is_key_pressed(KEY_LEFT)) &&
|
||||||
(!Input::get_singleton()->is_key_pressed(KEY_RIGHT))) {
|
(!Input::get_singleton()->is_key_pressed(KEY_RIGHT))) {
|
||||||
if (drag_selection.size() != 1) {
|
if (drag_selection.size() > 1) {
|
||||||
_commit_canvas_item_state(
|
_commit_canvas_item_state(
|
||||||
drag_selection,
|
drag_selection,
|
||||||
vformat(TTR("Move %d CanvasItems"), drag_selection.size()),
|
vformat(TTR("Move %d CanvasItems"), drag_selection.size()),
|
||||||
true);
|
true);
|
||||||
} else {
|
} else if (drag_selection.size() == 1) {
|
||||||
_commit_canvas_item_state(
|
_commit_canvas_item_state(
|
||||||
drag_selection,
|
drag_selection,
|
||||||
vformat(TTR("Move CanvasItem \"%s\" to (%d, %d)"),
|
vformat(TTR("Move CanvasItem \"%s\" to (%d, %d)"),
|
||||||
|
|
Loading…
Reference in a new issue