Update the torrent's download path field when changing category

In torrent options dialog while in Automatic Management Mode.
PR #16026.
This commit is contained in:
thalieht 2022-01-13 06:44:50 +02:00 committed by GitHub
parent 4d541ca969
commit 7c37c5c06f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -519,6 +519,9 @@ void TorrentOptionsDialog::handleCategoryChanged(const int index)
{
const QString savePath = BitTorrent::Session::instance()->categorySavePath(m_ui->comboCategory->currentText());
m_ui->savePath->setSelectedPath(Utils::Fs::toNativePath(savePath));
const QString downloadPath = BitTorrent::Session::instance()->categoryDownloadPath(m_ui->comboCategory->currentText());
m_ui->downloadPath->setSelectedPath(Utils::Fs::toNativePath(downloadPath));
m_ui->checkUseDownloadPath->setChecked(!downloadPath.isEmpty());
}
}