mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 14:08:03 -06:00
Correctly hide useless columns in AddNewTorrent file treeview. Closes #4955.
This commit is contained in:
@@ -686,7 +686,6 @@ void AddNewTorrentDialog::setupTreeview()
|
||||
m_contentModel = new TorrentContentFilterModel(this);
|
||||
connect(m_contentModel->model(), SIGNAL(filteredFilesChanged()), SLOT(updateDiskSpaceLabel()));
|
||||
ui->content_tree->setModel(m_contentModel);
|
||||
ui->content_tree->hideColumn(PROGRESS);
|
||||
m_contentDelegate = new PropListDelegate();
|
||||
ui->content_tree->setItemDelegate(m_contentDelegate);
|
||||
connect(ui->content_tree, SIGNAL(clicked(const QModelIndex &)), ui->content_tree, SLOT(edit(const QModelIndex &)));
|
||||
@@ -697,6 +696,10 @@ void AddNewTorrentDialog::setupTreeview()
|
||||
if (!m_headerState.isEmpty())
|
||||
ui->content_tree->header()->restoreState(m_headerState);
|
||||
|
||||
// Hide useless columns after loading the header state
|
||||
ui->content_tree->hideColumn(PROGRESS);
|
||||
ui->content_tree->hideColumn(REMAINING);
|
||||
|
||||
// Expand root folder
|
||||
ui->content_tree->setExpanded(m_contentModel->index(0, 0), true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user