From 779450232417f5ef1877d3a92d1e77daf2339dc8 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 e61557b62..fc7d366b3 100644 --- a/src/gui/addnewtorrentdialog.cpp +++ b/src/gui/addnewtorrentdialog.cpp @@ -704,7 +704,6 @@ void AddNewTorrentDialog::setupTreeview() m_contentModel = new TorrentContentFilterModel(this); connect(m_contentModel->model(), SIGNAL(filteredFilesChanged()), SLOT(updateDiskSpaceLabel())); ui->contentTreeView->setModel(m_contentModel); - ui->contentTreeView->hideColumn(PROGRESS); m_contentDelegate = new PropListDelegate(); ui->contentTreeView->setItemDelegate(m_contentDelegate); connect(ui->contentTreeView, SIGNAL(clicked(const QModelIndex &)), ui->contentTreeView, SLOT(edit(const QModelIndex &))); @@ -715,6 +714,10 @@ void AddNewTorrentDialog::setupTreeview() if (!m_headerState.isEmpty()) ui->contentTreeView->header()->restoreState(m_headerState); + // Hide useless columns after loading the header state + ui->contentTreeView->hideColumn(PROGRESS); + ui->contentTreeView->hideColumn(REMAINING); + // Expand root folder ui->contentTreeView->setExpanded(m_contentModel->index(0, 0), true); }