GUI: don't filter symbol list when not necessary
This commit is contained in:
parent
62cd2bb915
commit
408b6eeff9
|
@ -163,6 +163,19 @@ void SearchListView::searchTextChanged(const QString & text)
|
||||||
mAbstractSearchList->list()->hide();
|
mAbstractSearchList->list()->hide();
|
||||||
mAbstractSearchList->searchList()->show();
|
mAbstractSearchList->searchList()->show();
|
||||||
mCurList = mAbstractSearchList->searchList();
|
mCurList = mAbstractSearchList->searchList();
|
||||||
|
|
||||||
|
// filter the list
|
||||||
|
auto filterType = AbstractSearchList::FilterContainsTextCaseInsensitive;
|
||||||
|
switch(mRegexCheckbox->checkState())
|
||||||
|
{
|
||||||
|
case Qt::PartiallyChecked:
|
||||||
|
filterType = AbstractSearchList::FilterRegexCaseInsensitive;
|
||||||
|
break;
|
||||||
|
case Qt::Checked:
|
||||||
|
filterType = AbstractSearchList::FilterRegexCaseSensitive;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
mAbstractSearchList->filter(text, filterType, mSearchStartCol);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -171,19 +184,6 @@ void SearchListView::searchTextChanged(const QString & text)
|
||||||
mCurList = mAbstractSearchList->list();
|
mCurList = mAbstractSearchList->list();
|
||||||
}
|
}
|
||||||
|
|
||||||
// filter the list
|
|
||||||
auto filterType = AbstractSearchList::FilterContainsTextCaseInsensitive;
|
|
||||||
switch(mRegexCheckbox->checkState())
|
|
||||||
{
|
|
||||||
case Qt::PartiallyChecked:
|
|
||||||
filterType = AbstractSearchList::FilterRegexCaseInsensitive;
|
|
||||||
break;
|
|
||||||
case Qt::Checked:
|
|
||||||
filterType = AbstractSearchList::FilterRegexCaseSensitive;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
mAbstractSearchList->filter(text, filterType, mSearchStartCol); // TODO: do not filter if text is empty
|
|
||||||
|
|
||||||
// attempt to restore previous selection
|
// attempt to restore previous selection
|
||||||
bool hasSetSingleSelection = false;
|
bool hasSetSingleSelection = false;
|
||||||
if(!mLastFirstColValue.isEmpty())
|
if(!mLastFirstColValue.isEmpty())
|
||||||
|
|
Loading…
Reference in New Issue