|
|
@ -704,7 +704,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->contentTreeView->setModel(m_contentModel); |
|
|
|
ui->contentTreeView->setModel(m_contentModel); |
|
|
|
ui->contentTreeView->hideColumn(PROGRESS); |
|
|
|
|
|
|
|
m_contentDelegate = new PropListDelegate(); |
|
|
|
m_contentDelegate = new PropListDelegate(); |
|
|
|
ui->contentTreeView->setItemDelegate(m_contentDelegate); |
|
|
|
ui->contentTreeView->setItemDelegate(m_contentDelegate); |
|
|
|
connect(ui->contentTreeView, SIGNAL(clicked(const QModelIndex &)), ui->contentTreeView, SLOT(edit(const QModelIndex &))); |
|
|
|
connect(ui->contentTreeView, SIGNAL(clicked(const QModelIndex &)), ui->contentTreeView, SLOT(edit(const QModelIndex &))); |
|
|
@ -715,6 +714,10 @@ void AddNewTorrentDialog::setupTreeview() |
|
|
|
if (!m_headerState.isEmpty()) |
|
|
|
if (!m_headerState.isEmpty()) |
|
|
|
ui->contentTreeView->header()->restoreState(m_headerState); |
|
|
|
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
|
|
|
|
// Expand root folder
|
|
|
|
ui->contentTreeView->setExpanded(m_contentModel->index(0, 0), true); |
|
|
|
ui->contentTreeView->setExpanded(m_contentModel->index(0, 0), true); |
|
|
|
} |
|
|
|
} |
|
|
|