소스 검색

no old selection

Michael 2 년 전
부모
커밋
6013549ef8
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      client/lobby/SelectionTab.cpp

+ 6 - 0
client/lobby/SelectionTab.cpp

@@ -512,6 +512,12 @@ void SelectionTab::select(int position)
 		filter(-1);
 		slider->scrollTo(0);
 
+		int firstPos = boost::range::find_if(curItems, [](std::shared_ptr<ElementInfo> e) { return !e->isFolder; }) - curItems.begin();
+		if(firstPos < curItems.size())
+		{
+			selectAbs(firstPos);
+		}
+
 		return;
 	}