Pārlūkot izejas kodu

T hotkey select first town when last is active, fixes #1293

Piotr Wójcik 8 gadi atpakaļ
vecāks
revīzija
cc02001836
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      client/widgets/AdventureMapClasses.cpp

+ 2 - 2
client/widgets/AdventureMapClasses.cpp

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