Przeglądaj źródła

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

Piotr Wójcik 8 lat temu
rodzic
commit
cc02001836
1 zmienionych plików z 2 dodań i 2 usunięć
  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);
 }