mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
Merge pull request #295 from Chocimier/iss1293
T hotkey select first town when last is active, fixes #1293
This commit is contained in:
commit
1b7420264f
@ -169,11 +169,10 @@ void CList::selectIndex(int which)
|
||||
|
||||
void CList::selectNext()
|
||||
{
|
||||
int index = getSelectedIndex();
|
||||
if (index < 0)
|
||||
selectIndex(0);
|
||||
else if (index + 1 < list->size())
|
||||
selectIndex(index+1);
|
||||
int index = getSelectedIndex() + 1;
|
||||
if (index >= list->size())
|
||||
index = 0;
|
||||
selectIndex(index);
|
||||
}
|
||||
|
||||
void CList::selectPrev()
|
||||
|
Loading…
x
Reference in New Issue
Block a user