Browse Source

Allow to resize the columns in Add New Torrent dialog. Closes #1207 #676

adaptive-webui-19844
sledgehammer999 11 years ago
parent
commit
fce950b788
  1. 3
      src/addnewtorrentdialog.cpp
  2. 3
      src/addnewtorrentdialog.ui

3
src/addnewtorrentdialog.cpp

@ -82,6 +82,7 @@ AddNewTorrentDialog::AddNewTorrentDialog(QWidget *parent) :
ui->label_combo->addItem(label); ui->label_combo->addItem(label);
} }
ui->label_combo->model()->sort(0); ui->label_combo->model()->sort(0);
ui->content_tree->header()->setSortIndicator(0, Qt::AscendingOrder);
loadState(); loadState();
// Signal / slots // Signal / slots
connect(ui->adv_button, SIGNAL(clicked(bool)), SLOT(showAdvancedSettings(bool))); 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 // Expand root folder
ui->content_tree->setExpanded(m_contentModel->index(0, 0), true); ui->content_tree->setExpanded(m_contentModel->index(0, 0), true);
ui->content_tree->header()->setResizeMode(0, QHeaderView::Stretch);
} else { } else {
// Update save paths (append file name to them) // Update save paths (append file name to them)
QString single_file_relpath = misc::toQStringU(fs.file_path(0)); QString single_file_relpath = misc::toQStringU(fs.file_path(0));
@ -692,7 +692,6 @@ void AddNewTorrentDialog::updateMetadata(const QTorrentHandle &h) {
// 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);
ui->content_tree->header()->setResizeMode(0, QHeaderView::Stretch);
} else { } else {
// Update save paths (append file name to them) // Update save paths (append file name to them)
QString single_file_relpath = misc::toQStringU(fs.file_path(0)); QString single_file_relpath = misc::toQStringU(fs.file_path(0));

3
src/addnewtorrentdialog.ui

@ -176,9 +176,6 @@
<property name="sortingEnabled"> <property name="sortingEnabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<attribute name="headerStretchLastSection">
<bool>false</bool>
</attribute>
</widget> </widget>
</item> </item>
</layout> </layout>

Loading…
Cancel
Save