mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
no old selection
This commit is contained in:
parent
8693dab9ec
commit
6013549ef8
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user