diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-12-10 11:15:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-10 11:15:34 +0100 |
commit | d4d05783d6809662c7372e6c0c94362d73215155 (patch) | |
tree | 7cb5763cb0d9647f5cb3b75bd05ef670b89578c6 /editor/plugins | |
parent | 67259d07db3c502f5e2cbe02e869b565e2d0471f (diff) | |
parent | 66827337fdd46447b687124b5c3be4a0417f35c6 (diff) |
Merge pull request #44248 from Nickswoboda/fix-dragging-0-items
Fix scene being modified when arrows are pressed with no node selected
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index b1bac34f46..4227482ccc 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -2356,12 +2356,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_LEFT)) && (!Input::get_singleton()->is_key_pressed(KEY_RIGHT))) { - if (drag_selection.size() != 1) { + if (drag_selection.size() > 1) { _commit_canvas_item_state( drag_selection, vformat(TTR("Move %d CanvasItems"), drag_selection.size()), true); - } else { + } else if (drag_selection.size() == 1) { _commit_canvas_item_state( drag_selection, vformat(TTR("Move CanvasItem \"%s\" to (%d, %d)"), |