mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-29 19:18:42 -07:00
Expand folders when filtering files. Closes #1076.
This commit is contained in:
parent
68cc35e3fd
commit
60a1937bf9
2 changed files with 14 additions and 1 deletions
|
@ -79,7 +79,7 @@ PropertiesWidget::PropertiesWidget(QWidget *parent, MainWindow* main_window, Tra
|
|||
filesList->setSortingEnabled(true);
|
||||
// Torrent content filtering
|
||||
m_contentFilerLine = new LineEdit(this);
|
||||
connect(m_contentFilerLine, SIGNAL(textChanged(QString)), PropListModel, SLOT(setFilterFixedString(QString)));
|
||||
connect(m_contentFilerLine, SIGNAL(textChanged(QString)), this, SLOT(filterText(QString)));
|
||||
contentFilterLayout->insertWidget(1, m_contentFilerLine);
|
||||
|
||||
// SIGNAL/SLOTS
|
||||
|
@ -732,3 +732,13 @@ void PropertiesWidget::filteredFilesChanged() {
|
|||
applyPriorities();
|
||||
}
|
||||
}
|
||||
|
||||
void PropertiesWidget::filterText(const QString& filter) {
|
||||
PropListModel->setFilterFixedString(filter);
|
||||
if (filter.isEmpty()) {
|
||||
filesList->collapseAll();
|
||||
filesList->expand(PropListModel->index(0, 0));
|
||||
}
|
||||
else
|
||||
filesList->expandAll();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue