1
0
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:
Piotr Wójcik
2017-05-11 20:49:17 +02:00
parent 48702a26a4
commit cc02001836

View File

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