From b568cdb1aa91ea1214a2e97e50b7d08ffdb5de1a Mon Sep 17 00:00:00 2001 From: Vladimir Golovnev Date: Sun, 2 Oct 2022 08:46:27 +0300 Subject: [PATCH] Correctly load state of use download folder PR #17807. Closes #17793. --- src/gui/watchedfolderoptionsdialog.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/watchedfolderoptionsdialog.cpp b/src/gui/watchedfolderoptionsdialog.cpp index 480352b8e..06deb20e1 100644 --- a/src/gui/watchedfolderoptionsdialog.cpp +++ b/src/gui/watchedfolderoptionsdialog.cpp @@ -52,11 +52,11 @@ WatchedFolderOptionsDialog::WatchedFolderOptionsDialog( m_ui->savePath->setMode(FileSystemPathEdit::Mode::DirectorySave); m_ui->savePath->setDialogCaption(tr("Choose save path")); - const auto *session = BitTorrent::Session::instance(); - m_ui->downloadPath->setMode(FileSystemPathEdit::Mode::DirectorySave); m_ui->downloadPath->setDialogCaption(tr("Choose save path")); - m_ui->groupBoxDownloadPath->setChecked(watchedFolderOptions.addTorrentParams.useDownloadPath.value_or(session->isDownloadPathEnabled())); + + const auto *session = BitTorrent::Session::instance(); + m_useDownloadPath = watchedFolderOptions.addTorrentParams.useDownloadPath.value_or(session->isDownloadPathEnabled()); connect(m_ui->comboTTM, qOverload(&QComboBox::currentIndexChanged), this, &WatchedFolderOptionsDialog::onTMMChanged); connect(m_ui->categoryComboBox, qOverload(&QComboBox::currentIndexChanged), this, &WatchedFolderOptionsDialog::onCategoryChanged);