mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
Correctly hide useless columns in AddNewTorrent file treeview. Closes #4955.
This commit is contained in:
parent
e9f6cfc2e8
commit
e6480f9dff
1 changed files with 4 additions and 1 deletions
|
@ -686,7 +686,6 @@ void AddNewTorrentDialog::setupTreeview()
|
||||||
m_contentModel = new TorrentContentFilterModel(this);
|
m_contentModel = new TorrentContentFilterModel(this);
|
||||||
connect(m_contentModel->model(), SIGNAL(filteredFilesChanged()), SLOT(updateDiskSpaceLabel()));
|
connect(m_contentModel->model(), SIGNAL(filteredFilesChanged()), SLOT(updateDiskSpaceLabel()));
|
||||||
ui->content_tree->setModel(m_contentModel);
|
ui->content_tree->setModel(m_contentModel);
|
||||||
ui->content_tree->hideColumn(PROGRESS);
|
|
||||||
m_contentDelegate = new PropListDelegate();
|
m_contentDelegate = new PropListDelegate();
|
||||||
ui->content_tree->setItemDelegate(m_contentDelegate);
|
ui->content_tree->setItemDelegate(m_contentDelegate);
|
||||||
connect(ui->content_tree, SIGNAL(clicked(const QModelIndex &)), ui->content_tree, SLOT(edit(const QModelIndex &)));
|
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())
|
if (!m_headerState.isEmpty())
|
||||||
ui->content_tree->header()->restoreState(m_headerState);
|
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
|
// Expand root folder
|
||||||
ui->content_tree->setExpanded(m_contentModel->index(0, 0), true);
|
ui->content_tree->setExpanded(m_contentModel->index(0, 0), true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue