Browse Source

no old selection

Michael 2 years ago
parent
commit
6013549ef8
1 changed files with 6 additions and 0 deletions
  1. 6 0
      client/lobby/SelectionTab.cpp

+ 6 - 0
client/lobby/SelectionTab.cpp

@@ -512,6 +512,12 @@ void SelectionTab::select(int position)
 		filter(-1);
 		filter(-1);
 		slider->scrollTo(0);
 		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;
 		return;
 	}
 	}