Merge pull request #348 from epasveer/346-avoid-collapsing-file-tree-when-searching

Don't collapse items when searching.
This commit is contained in:
Ernie Pasveer
2025-08-30 11:53:02 -05:00
committed by GitHub
+9 -6
View File
@@ -146,18 +146,21 @@ void SeerSourceBrowserWidget::handleText (const QString& text) {
}
}
// Always expand the source items. Expanding the other
// items are under the user's control.
_sourceFilesItems->setExpanded(true);
_headerFilesItems->setExpanded(false);
_miscFilesItems->setExpanded(false);
}else{
// Ignore others.
}
// Sort each item separately.
_sourceFilesItems->sortChildren(0, Qt::AscendingOrder);
_headerFilesItems->sortChildren(0, Qt::AscendingOrder);
_miscFilesItems->sortChildren(0, Qt::AscendingOrder);
sourceTreeWidget->resizeColumnToContents(0);
sourceTreeWidget->resizeColumnToContents(1);
sourceTreeWidget->sortByColumn(0, Qt::AscendingOrder);
sourceTreeWidget->setSortingEnabled(true);
sourceSearchLineEdit->clear();
@@ -262,9 +265,9 @@ void SeerSourceBrowserWidget::handleSearchLineEdit (const QString& text) {
}
}
// Always expand the source items. Expanding the other
// items are under the user's control.
_sourceFilesItems->setExpanded(true);
_headerFilesItems->setExpanded(false);
_miscFilesItems->setExpanded(false);
//qDebug() << text << matches.size();
}