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