mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
T hotkey select first town when last is active, fixes #1293
This commit is contained in:
@@ -170,9 +170,9 @@ void CList::selectIndex(int which)
|
||||
void CList::selectNext()
|
||||
{
|
||||
int index = getSelectedIndex();
|
||||
if (index < 0)
|
||||
if (index < 0 || index+1 >= list->size())
|
||||
selectIndex(0);
|
||||
else if (index + 1 < list->size())
|
||||
else
|
||||
selectIndex(index+1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user