mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Merge pull request #254 from sledgehammer999/fix_default_path
Fix behaviour of the torrent addition dialog. The 'set as default path' ...
This commit is contained in:
commit
177e6738e4
3 changed files with 19 additions and 8 deletions
|
@ -65,7 +65,7 @@ AddNewTorrentDialog::AddNewTorrentDialog(QWidget *parent) :
|
|||
QIniSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
||||
Preferences pref;
|
||||
ui->start_torrent_cb->setChecked(!pref.addTorrentsInPause());
|
||||
ui->save_path_combo->addItem(fsutils::toDisplayPath(pref.getSavePath()));
|
||||
ui->save_path_combo->addItem(fsutils::toDisplayPath(pref.getSavePath()), pref.getSavePath());
|
||||
loadSavePathHistory();
|
||||
ui->save_path_combo->insertSeparator(ui->save_path_combo->count());
|
||||
ui->save_path_combo->addItem(tr("Other...", "Other save path..."));
|
||||
|
@ -594,6 +594,8 @@ void AddNewTorrentDialog::on_buttonBox_accepted()
|
|||
saveSavePathHistory();
|
||||
// Save settings
|
||||
pref.useAdditionDialog(!ui->never_show_cb->isChecked());
|
||||
if (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());
|
||||
QBtSession::instance()->setDefaultSavePath(pref.getSavePath());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue