Browse Source

Correctly load state of use download folder

PR #17807.
Closes #17793.
adaptive-webui-19844
Vladimir Golovnev 2 years ago committed by GitHub
parent
commit
b568cdb1aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/gui/watchedfolderoptionsdialog.cpp

6
src/gui/watchedfolderoptionsdialog.cpp

@ -52,11 +52,11 @@ WatchedFolderOptionsDialog::WatchedFolderOptionsDialog(
m_ui->savePath->setMode(FileSystemPathEdit::Mode::DirectorySave); m_ui->savePath->setMode(FileSystemPathEdit::Mode::DirectorySave);
m_ui->savePath->setDialogCaption(tr("Choose save path")); m_ui->savePath->setDialogCaption(tr("Choose save path"));
const auto *session = BitTorrent::Session::instance();
m_ui->downloadPath->setMode(FileSystemPathEdit::Mode::DirectorySave); m_ui->downloadPath->setMode(FileSystemPathEdit::Mode::DirectorySave);
m_ui->downloadPath->setDialogCaption(tr("Choose save path")); 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<int>(&QComboBox::currentIndexChanged), this, &WatchedFolderOptionsDialog::onTMMChanged); connect(m_ui->comboTTM, qOverload<int>(&QComboBox::currentIndexChanged), this, &WatchedFolderOptionsDialog::onTMMChanged);
connect(m_ui->categoryComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, &WatchedFolderOptionsDialog::onCategoryChanged); connect(m_ui->categoryComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, &WatchedFolderOptionsDialog::onCategoryChanged);

Loading…
Cancel
Save