Merge pull request #59172 from taigi100/Bugfix-#58726-List-items-are-shown-twice-in-the-2D-editor's-"Show-list-of-selectable-nodes-at-position-clicked"-mode

Update to only use select tool on button press
This commit is contained in:
Rémi Verschelde 2022-03-16 00:06:41 +01:00 committed by GitHub
commit 1de66f1357
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -2216,7 +2216,7 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
Ref<InputEventKey> k = p_event;
if (drag_type == DRAG_NONE) {
if (b.is_valid() &&
if (b.is_valid() && b->is_pressed() &&
((b->get_button_index() == MouseButton::RIGHT && b->is_alt_pressed() && tool == TOOL_SELECT) ||
(b->get_button_index() == MouseButton::LEFT && tool == TOOL_LIST_SELECT))) {
// Popup the selection menu list