mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 23:07:59 +00:00
Fix "Set as default save path" checkbox in torrent addition dialog
This commit is contained in:
parent
90373897d6
commit
89249c140f
@ -369,6 +369,7 @@ void AddNewTorrentDialog::onSavePathChanged(int index)
|
|||||||
connect(ui->save_path_combo, SIGNAL(currentIndexChanged(int)), SLOT(onSavePathChanged(int)));
|
connect(ui->save_path_combo, SIGNAL(currentIndexChanged(int)), SLOT(onSavePathChanged(int)));
|
||||||
}
|
}
|
||||||
// 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->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()) != defaultSaveDir);
|
||||||
relayout();
|
relayout();
|
||||||
// Remember index
|
// Remember index
|
||||||
@ -593,6 +594,6 @@ void AddNewTorrentDialog::on_buttonBox_accepted()
|
|||||||
saveSavePathHistory();
|
saveSavePathHistory();
|
||||||
// Save settings
|
// Save settings
|
||||||
pref.useAdditionDialog(!ui->never_show_cb->isChecked());
|
pref.useAdditionDialog(!ui->never_show_cb->isChecked());
|
||||||
if (ui->default_save_path_cb->isVisible() && ui->default_save_path_cb->isChecked())
|
if (ui->default_save_path_cb->isChecked())
|
||||||
pref.setSavePath(ui->save_path_combo->itemData(ui->save_path_combo->currentIndex()).toString());
|
pref.setSavePath(ui->save_path_combo->itemData(ui->save_path_combo->currentIndex()).toString());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user