From fce950b788a4a5aba28ce30cf5e26675361a1372 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Thu, 2 Jan 2014 19:44:23 +0200 Subject: [PATCH] Allow to resize the columns in Add New Torrent dialog. Closes #1207 #676 --- src/addnewtorrentdialog.cpp | 3 +-- src/addnewtorrentdialog.ui | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/addnewtorrentdialog.cpp b/src/addnewtorrentdialog.cpp index 5369dd45a..4bcdf7191 100644 --- a/src/addnewtorrentdialog.cpp +++ b/src/addnewtorrentdialog.cpp @@ -82,6 +82,7 @@ AddNewTorrentDialog::AddNewTorrentDialog(QWidget *parent) : ui->label_combo->addItem(label); } ui->label_combo->model()->sort(0); + ui->content_tree->header()->setSortIndicator(0, Qt::AscendingOrder); loadState(); // Signal / slots connect(ui->adv_button, SIGNAL(clicked(bool)), SLOT(showAdvancedSettings(bool))); @@ -237,7 +238,6 @@ bool AddNewTorrentDialog::loadTorrent(const QString& torrent_path, const QString // Expand root folder ui->content_tree->setExpanded(m_contentModel->index(0, 0), true); - ui->content_tree->header()->setResizeMode(0, QHeaderView::Stretch); } else { // Update save paths (append file name to them) QString single_file_relpath = misc::toQStringU(fs.file_path(0)); @@ -692,7 +692,6 @@ void AddNewTorrentDialog::updateMetadata(const QTorrentHandle &h) { // Expand root folder ui->content_tree->setExpanded(m_contentModel->index(0, 0), true); - ui->content_tree->header()->setResizeMode(0, QHeaderView::Stretch); } else { // Update save paths (append file name to them) QString single_file_relpath = misc::toQStringU(fs.file_path(0)); diff --git a/src/addnewtorrentdialog.ui b/src/addnewtorrentdialog.ui index e348b6233..22f0b13d8 100644 --- a/src/addnewtorrentdialog.ui +++ b/src/addnewtorrentdialog.ui @@ -176,9 +176,6 @@ true - - false -