better
This commit is contained in:
parent
4736b30042
commit
727c0656ef
|
@ -150,17 +150,16 @@ bool SearchListView::findTextInList(SearchListViewTable* list, QString text, int
|
|||
|
||||
void SearchListView::searchTextChanged(const QString & arg1)
|
||||
{
|
||||
QString lastFirstColValue = "";
|
||||
if(mSearchList->isHidden())
|
||||
{
|
||||
auto selList = mList->getSelection();
|
||||
if(!selList.empty())
|
||||
if(!selList.empty() && mList->isValidIndex(selList[0], 0))
|
||||
lastFirstColValue = mList->getCellContent(selList[0], 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
auto selList = mSearchList->getSelection();
|
||||
if(!selList.empty())
|
||||
auto selList = mSearchList->getSelection(); // bug?: still return QList<0> if empty
|
||||
if(!selList.empty() && mSearchList->isValidIndex(selList[0], 0))
|
||||
lastFirstColValue = mSearchList->getCellContent(selList[0], 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ public:
|
|||
SearchListViewTable* mCurList;
|
||||
QLineEdit* mSearchBox;
|
||||
int mSearchStartCol;
|
||||
QString lastFirstColValue;
|
||||
|
||||
bool findTextInList(SearchListViewTable* list, QString text, int row, int startcol, bool startswith);
|
||||
void refreshSearchList();
|
||||
|
|
Loading…
Reference in New Issue