From 5f47e18b0fa95d5dbedd657d1e96f31896bba9b1 Mon Sep 17 00:00:00 2001 From: homer666 Date: Fri, 18 Jan 2019 01:54:24 +1100 Subject: [PATCH] ItemList: ignore `ui_select` action if Select Mode is not "Multi" --- scene/gui/item_list.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index f5521cccd5b..efe452305b9 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -715,9 +715,9 @@ void ItemList::_gui_input(const Ref &p_event) { } } else if (p_event->is_action("ui_cancel")) { search_string = ""; - } else if (p_event->is_action("ui_select")) { + } else if (p_event->is_action("ui_select") && select_mode == SELECT_MULTI) { - if (select_mode == SELECT_MULTI && current >= 0 && current < items.size()) { + if (current >= 0 && current < items.size()) { if (items[current].selectable && !items[current].disabled && !items[current].selected) { select(current, false); emit_signal("multi_selected", current, true);