diff --git a/src/gui/addnewtorrentdialog.cpp b/src/gui/addnewtorrentdialog.cpp index cf86b1dbd..4d989bcd3 100644 --- a/src/gui/addnewtorrentdialog.cpp +++ b/src/gui/addnewtorrentdialog.cpp @@ -201,7 +201,7 @@ AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inP m_ui->startTorrentCheckBox->setChecked(!m_torrentParams.addPaused.value_or(session->isAddTorrentPaused())); - m_ui->comboTTM->blockSignals(true); // the TreeView size isn't correct if the slot does it job at this point + m_ui->comboTTM->blockSignals(true); // the TreeView size isn't correct if the slot does its job at this point m_ui->comboTTM->setCurrentIndex(session->isAutoTMMDisabledByDefault() ? 0 : 1); m_ui->comboTTM->blockSignals(false); @@ -899,6 +899,8 @@ void AddNewTorrentDialog::setupTreeview() connect(m_ui->contentTreeView, &QAbstractItemView::clicked, m_ui->contentTreeView , qOverload(&QAbstractItemView::edit)); connect(m_ui->contentTreeView, &QWidget::customContextMenuRequested, this, &AddNewTorrentDialog::displayContentTreeMenu); + connect(m_ui->buttonSelectAll, &QPushButton::clicked, m_contentModel, &TorrentContentFilterModel::selectAll); + connect(m_ui->buttonSelectNone, &QPushButton::clicked, m_contentModel, &TorrentContentFilterModel::selectNone); const auto contentLayout = ((m_ui->contentLayoutComboBox->currentIndex() == 0) ? BitTorrent::detectContentLayout(m_torrentInfo.filePaths()) @@ -989,9 +991,9 @@ void AddNewTorrentDialog::TMMChanged(int index) m_ui->groupBoxDownloadPath->blockSignals(true); m_ui->groupBoxDownloadPath->setChecked(!downloadPath.isEmpty()); - - updateDiskSpaceLabel(); } + + updateDiskSpaceLabel(); } void AddNewTorrentDialog::doNotDeleteTorrentClicked(bool checked) diff --git a/src/gui/addnewtorrentdialog.ui b/src/gui/addnewtorrentdialog.ui index 9a444a3a5..1089c6970 100644 --- a/src/gui/addnewtorrentdialog.ui +++ b/src/gui/addnewtorrentdialog.ui @@ -392,22 +392,59 @@ - - - - 1 - 0 - - - - Qt::CustomContextMenu - - - QAbstractItemView::ExtendedSelection - - - true - + + + + + + + + Select All + + + + + + + Select None + + + + + + + Qt::Horizontal + + + + 168 + 20 + + + + + + + + + + + 1 + 0 + + + + Qt::CustomContextMenu + + + QAbstractItemView::ExtendedSelection + + + true + + + +