1
0
Fork 0

GUI: don't filter symbol list when not necessary

This commit is contained in:
Duncan Ogilvie 2018-05-08 19:21:27 +02:00
parent 62cd2bb915
commit 408b6eeff9
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
1 changed files with 13 additions and 13 deletions

View File

@ -163,13 +163,6 @@ void SearchListView::searchTextChanged(const QString & text)
mAbstractSearchList->list()->hide(); mAbstractSearchList->list()->hide();
mAbstractSearchList->searchList()->show(); mAbstractSearchList->searchList()->show();
mCurList = mAbstractSearchList->searchList(); mCurList = mAbstractSearchList->searchList();
}
else
{
mAbstractSearchList->searchList()->hide();
mAbstractSearchList->list()->show();
mCurList = mAbstractSearchList->list();
}
// filter the list // filter the list
auto filterType = AbstractSearchList::FilterContainsTextCaseInsensitive; auto filterType = AbstractSearchList::FilterContainsTextCaseInsensitive;
@ -182,7 +175,14 @@ void SearchListView::searchTextChanged(const QString & text)
filterType = AbstractSearchList::FilterRegexCaseSensitive; filterType = AbstractSearchList::FilterRegexCaseSensitive;
break; break;
} }
mAbstractSearchList->filter(text, filterType, mSearchStartCol); // TODO: do not filter if text is empty mAbstractSearchList->filter(text, filterType, mSearchStartCol);
}
else
{
mAbstractSearchList->searchList()->hide();
mAbstractSearchList->list()->show();
mCurList = mAbstractSearchList->list();
}
// attempt to restore previous selection // attempt to restore previous selection
bool hasSetSingleSelection = false; bool hasSetSingleSelection = false;