fixed expanding/collapsing of items on search

This commit is contained in:
csoler 2018-01-24 00:26:22 +01:00
parent 1ee353c5a7
commit d93e259702

View File

@ -1332,11 +1332,14 @@ void SharedFilesDialog::FilterItems()
std::list<std::string> keywords ; std::list<std::string> keywords ;
std::list<DirDetails> result_list ; std::list<DirDetails> result_list ;
if(text.isNull()) if(text == "")
{ {
int rowCount = ui.dirTreeView->model()->rowCount(); int rowCount = ui.dirTreeView->model()->rowCount();
for (int row = 0; row < rowCount; ++row) for (int row = 0; row < rowCount; ++row)
recursMakeAllVisible(ui.dirTreeView,ui.dirTreeView->model()->index(row, COLUMN_NAME)) ; recursMakeAllVisible(ui.dirTreeView,ui.dirTreeView->model()->index(row, COLUMN_NAME)) ;
setCursor(Qt::ArrowCursor);
return ; return ;
} }
keywords.push_back(text.toStdString()); keywords.push_back(text.toStdString());