summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-06 20:33:08 +0200
committerGitHub <noreply@github.com>2019-07-06 20:33:08 +0200
commitda1d5d89fd4a7e43b6b3cec6fd0550c0bc70e02e (patch)
treeb1d6e0eb06fe037c2abdaa203b5d301a9d422f4c
parent3c133aebdafd5002a7b8d4494be19d76977c3bc1 (diff)
parent597e6e1bd9bec44699a5dc4dfb87f96b5d8e055e (diff)
Merge pull request #30371 from creikey/fix-30366
Give up finding item if started at beginning
-rw-r--r--scene/gui/item_list.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 91b76839d7..a3bc68ffcd 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -754,7 +754,7 @@ void ItemList::_gui_input(const Ref<InputEvent> &p_event) {
for (int i = current + 1; i <= items.size(); i++) {
if (i == items.size()) {
- if (current == 0)
+ if (current == 0 || current == -1)
break;
else
i = 0;