Skip to content

Commit 679aa23

Browse files
lynnuxmrexodia
authored andcommitted
fix filter search bug in symbolview, and avoid double call setSingleSelection
1 parent e5cd181 commit 679aa23

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/gui/Src/BasicView/SearchListView.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ void SearchListView::searchTextChanged(const QString & arg1)
186186
mCurList = mList;
187187
}
188188

189-
mCurList->setSingleSelection(0);
190189
mSearchList->setRowCount(0);
191190
int rows = mList->getRowCount();
192191
int columns = mList->getColumnCount();
@@ -203,6 +202,7 @@ void SearchListView::searchTextChanged(const QString & arg1)
203202

204203
mSearchList->reloadData();
205204

205+
bool hasSetSingleSelection = false;
206206
if(!mLastFirstColValue.isEmpty())
207207
{
208208
rows = mCurList->getRowCount();
@@ -219,10 +219,13 @@ void SearchListView::searchTextChanged(const QString & arg1)
219219
mCurList->setTableOffset(cur);
220220
}
221221
mCurList->setSingleSelection(i);
222+
hasSetSingleSelection = true;
222223
break;
223224
}
224225
}
225226
}
227+
if(!hasSetSingleSelection)
228+
mCurList->setSingleSelection(0);
226229

227230
if(rows == 0)
228231
emit emptySearchResult();

0 commit comments

Comments
 (0)