From e6480f9dff3fd14a77455f4d54018ef86918bef6 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Fri, 18 Mar 2016 00:23:11 +0200 Subject: [PATCH] Correctly hide useless columns in AddNewTorrent file treeview. Closes #4955. --- src/gui/addnewtorrentdialog.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/addnewtorrentdialog.cpp b/src/gui/addnewtorrentdialog.cpp index 54a06ffcc..234d22323 100644 --- a/src/gui/addnewtorrentdialog.cpp +++ b/src/gui/addnewtorrentdialog.cpp @@ -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); }