@@ -593,17 +593,19 @@ void OptionsDialog::loadDownloadsTabOptions()
593593 m_ui->checkConfirmMergeTrackers ->setChecked (m_ui->checkConfirmMergeTrackers ->isEnabled () ? pref->confirmMergeTrackers () : false );
594594 });
595595
596+ m_ui->backupDirCheckBox ->setChecked (session->isTorrentFileBackupEnabled ());
596597 m_ui->backupDirPathEdit ->setDialogCaption (tr (" Choose backup directory" ));
597598 m_ui->backupDirPathEdit ->setMode (FileSystemPathEdit::Mode::DirectorySave);
598599 m_ui->backupDirPathEdit ->setBasePath (specialFolderLocation (SpecialFolder::Data));
599600 m_ui->backupDirPathEdit ->setSelectedPath (session->torrentBackupDirectory ());
601+ m_ui->backupDirPathEdit ->setEnabled (m_ui->backupDirCheckBox ->isChecked ());
600602 m_ui->finishedBackupDirCheckBox ->setChecked (session->isFinishedTorrentBackupDirectoryEnabled ());
601603 m_ui->finishedBackupDirPathEdit ->setDialogCaption (tr (" Choose backup directory" ));
602604 m_ui->finishedBackupDirPathEdit ->setMode (FileSystemPathEdit::Mode::DirectorySave);
603605 m_ui->finishedBackupDirPathEdit ->setBasePath (specialFolderLocation (SpecialFolder::Data));
604606 m_ui->finishedBackupDirPathEdit ->setSelectedPath (session->finishedTorrentBackupDirectory ());
607+ m_ui->finishedBackupDirPathEdit ->setEnabled (m_ui->finishedBackupDirCheckBox ->isChecked ());
605608 m_ui->removeBackupTorrentFileCheckBox ->setChecked (session->removeTorrentFileBackup ());
606- m_ui->backupTorrentFileGroupBox ->setChecked (session->isTorrentFileBackupEnabled ());
607609
608610 const TorrentFileGuard::AutoDeleteMode autoDeleteMode = TorrentFileGuard::autoDeleteMode ();
609611 m_ui->deleteTorrentBox ->setChecked (autoDeleteMode != TorrentFileGuard::Never);
@@ -748,7 +750,8 @@ void OptionsDialog::loadDownloadsTabOptions()
748750 connect (m_ui->checkMergeTrackers , &QAbstractButton::toggled, this , &ThisType::enableApplyButton);
749751 connect (m_ui->checkConfirmMergeTrackers , &QAbstractButton::toggled, this , &ThisType::enableApplyButton);
750752
751- connect (m_ui->backupTorrentFileGroupBox , &QGroupBox::toggled, this , &ThisType::enableApplyButton);
753+ connect (m_ui->backupDirCheckBox , &QAbstractButton::toggled, this , &ThisType::enableApplyButton);
754+ connect (m_ui->backupDirCheckBox , &QAbstractButton::toggled, m_ui->backupDirPathEdit , &QWidget::setEnabled);
752755 connect (m_ui->finishedBackupDirCheckBox , &QAbstractButton::toggled, this , &ThisType::enableApplyButton);
753756 connect (m_ui->finishedBackupDirCheckBox , &QAbstractButton::toggled, m_ui->finishedBackupDirPathEdit , &QWidget::setEnabled);
754757 connect (m_ui->backupDirPathEdit , &FileSystemPathEdit::selectedPathChanged, this , &ThisType::enableApplyButton);
@@ -820,7 +823,7 @@ void OptionsDialog::saveDownloadsTabOptions() const
820823 session->setAddTorrentStopped (addTorrentsStopped ());
821824 session->setTorrentStopCondition (m_ui->stopConditionComboBox ->currentData ().value <BitTorrent::Torrent::StopCondition>());
822825
823- session->setTorrentFileBackupEnabled (m_ui->backupTorrentFileGroupBox ->isChecked ());
826+ session->setTorrentFileBackupEnabled (m_ui->backupDirCheckBox ->isChecked ());
824827 session->setTorrentBackupDirectory (m_ui->backupDirPathEdit ->selectedPath ());
825828 session->setFinishedTorrentBackupDirectoryEnabled (m_ui->finishedBackupDirCheckBox ->isChecked ());
826829 session->setFinishedTorrentBackupDirectory (m_ui->finishedBackupDirPathEdit ->selectedPath ());
0 commit comments