Merge pull request #30371 from creikey/fix-30366

Give up finding item if started at beginning
This commit is contained in:
Rémi Verschelde 2019-07-06 20:33:08 +02:00 committed by GitHub
commit da1d5d89fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;