mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-09 13:14:02 +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()
|
void CList::selectNext()
|
||||||
{
|
{
|
||||||
int index = getSelectedIndex();
|
int index = getSelectedIndex() + 1;
|
||||||
if (index < 0)
|
if (index >= list->size())
|
||||||
selectIndex(0);
|
index = 0;
|
||||||
else if (index + 1 < list->size())
|
selectIndex(index);
|
||||||
selectIndex(index+1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CList::selectPrev()
|
void CList::selectPrev()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user