mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
Expand folders when filtering files. Closes #1076.
This commit is contained in:
parent
68cc35e3fd
commit
60a1937bf9
@ -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();
|
||||
}
|
||||
|
@ -116,6 +116,9 @@ private:
|
||||
QShortcut *editHotkeyFile;
|
||||
QShortcut *editHotkeyWeb;
|
||||
QShortcut *deleteHotkeyWeb;
|
||||
|
||||
private slots:
|
||||
void filterText(const QString& filter);
|
||||
};
|
||||
|
||||
#endif // PROPERTIESWIDGET_H
|
||||
|
Loading…
Reference in New Issue
Block a user