1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00
This commit is contained in:
Piotr Wójcik 2017-05-13 16:57:15 +02:00
parent cc02001836
commit e4d3cdca09

View File

@ -169,11 +169,10 @@ void CList::selectIndex(int which)
void CList::selectNext()
{
int index = getSelectedIndex();
if (index < 0 || index+1 >= list->size())
selectIndex(0);
else
selectIndex(index+1);
int index = getSelectedIndex() + 1;
if (index >= list->size())
index = 0;
selectIndex(index);
}
void CList::selectPrev()