mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Fix case where the default save wasn't getting updated in the addition dialog.
This commit is contained in:
parent
d9d63141bb
commit
04e4295140
1 changed files with 2 additions and 2 deletions
|
@ -323,7 +323,7 @@ void AddNewTorrentDialog::updateDiskSpaceLabel()
|
||||||
void AddNewTorrentDialog::onSavePathChanged(int index)
|
void AddNewTorrentDialog::onSavePathChanged(int index)
|
||||||
{
|
{
|
||||||
static int old_index = 0;
|
static int old_index = 0;
|
||||||
static QDir defaultSaveDir(ui->save_path_combo->itemData(0).toString());
|
Preferences pref;
|
||||||
|
|
||||||
if (index == (ui->save_path_combo->count() - 1)) {
|
if (index == (ui->save_path_combo->count() - 1)) {
|
||||||
disconnect(ui->save_path_combo, SIGNAL(currentIndexChanged(int)), this, SLOT(onSavePathChanged(int)));
|
disconnect(ui->save_path_combo, SIGNAL(currentIndexChanged(int)), this, SLOT(onSavePathChanged(int)));
|
||||||
|
@ -370,7 +370,7 @@ void AddNewTorrentDialog::onSavePathChanged(int index)
|
||||||
}
|
}
|
||||||
// Toggle default save path setting checkbox visibility
|
// Toggle default save path setting checkbox visibility
|
||||||
ui->default_save_path_cb->setChecked(false);
|
ui->default_save_path_cb->setChecked(false);
|
||||||
ui->default_save_path_cb->setVisible(QDir(ui->save_path_combo->itemData(ui->save_path_combo->currentIndex()).toString()) != defaultSaveDir);
|
ui->default_save_path_cb->setVisible(QDir(ui->save_path_combo->itemData(ui->save_path_combo->currentIndex()).toString()) != pref.getSavePath());
|
||||||
relayout();
|
relayout();
|
||||||
// Remember index
|
// Remember index
|
||||||
old_index = ui->save_path_combo->currentIndex();
|
old_index = ui->save_path_combo->currentIndex();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue