ItemList selection: Check against item count
ItemList needs to check against the number of items available when the user moves the selection via "ui_right" action.
(cherry picked from commit cbcb96ae85
)
This commit is contained in:
parent
826108efec
commit
d89015cfe3
|
@ -675,7 +675,7 @@ void ItemList::_gui_input(const Ref<InputEvent> &p_event) {
|
||||||
|
|
||||||
search_string = ""; //any mousepress cancels
|
search_string = ""; //any mousepress cancels
|
||||||
|
|
||||||
if (current % current_columns != (current_columns - 1)) {
|
if (current % current_columns != (current_columns - 1) && current + 1 < items.size()) {
|
||||||
set_current(current + 1);
|
set_current(current + 1);
|
||||||
ensure_current_is_visible();
|
ensure_current_is_visible();
|
||||||
if (select_mode == SELECT_SINGLE) {
|
if (select_mode == SELECT_SINGLE) {
|
||||||
|
|
Loading…
Reference in New Issue