瀏覽代碼

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

Piotr Wójcik 8 年之前
父節點
當前提交
cc02001836
共有 1 個文件被更改,包括 2 次插入2 次删除
  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);
 }