diff --git a/src/preferences/options_imp.cpp b/src/preferences/options_imp.cpp index 0bbaf92e1..977bf3d63 100644 --- a/src/preferences/options_imp.cpp +++ b/src/preferences/options_imp.cpp @@ -155,7 +155,6 @@ options_imp::options_imp(QWidget *parent): connect(textSavePath, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); connect(textTempPath, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton())); connect(checkAppendLabel, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); - connect(checkLastLocation, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(checkAppendqB, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(checkPreallocateAll, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); connect(checkAdditionDialog, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); @@ -392,7 +391,6 @@ void options_imp::saveOptions(){ #endif pref.setTempPath(temp_path); pref.setAppendTorrentLabel(checkAppendLabel->isChecked()); - pref.setRememberLastLocation(checkLastLocation->isChecked()); #if LIBTORRENT_VERSION_MINOR > 14 pref.useIncompleteFilesExtension(checkAppendqB->isChecked()); #endif @@ -570,7 +568,6 @@ void options_imp::loadOptions(){ #endif textTempPath->setText(temp_path); checkAppendLabel->setChecked(pref.appendTorrentLabel()); - checkLastLocation->setChecked(pref.rememberLastLocation()); #if LIBTORRENT_VERSION_MINOR > 14 checkAppendqB->setChecked(pref.useIncompleteFilesExtension()); #endif diff --git a/src/torrentadditiondlg.cpp b/src/torrentadditiondlg.cpp index 5e880ef49..b63561a82 100644 --- a/src/torrentadditiondlg.cpp +++ b/src/torrentadditiondlg.cpp @@ -88,6 +88,7 @@ torrentAdditionDialog::torrentAdditionDialog(QWidget *parent) : savePathTxt->setInsertPolicy(QComboBox::InsertAtCurrent); //torrentContentList->header()->setResizeMode(0, QHeaderView::Stretch); QString lastLocation = pref.lastLocationPath(); + checkLastFolder->setChecked(pref.rememberLastLocation()); //lastLocation will always have '/' as separator since it is saved in //::on_OkButton_clicked() after the conversion is done. if (pref.rememberLastLocation() && !lastLocation.isEmpty() && QFile(lastLocation).exists()) @@ -700,7 +701,9 @@ void torrentAdditionDialog::on_OkButton_clicked(){ //Save last location path {//limit the scope of pref Preferences pref; - if (pref.rememberLastLocation()) + bool isChecked = checkLastFolder->isChecked(); + if (pref.rememberLastLocation() != isChecked) pref.setRememberLastLocation(isChecked); + if (pref.rememberLastLocation() && save_path != pref.lastLocationPath()) pref.setLastLocationPath(save_path); } // save filtered files diff --git a/src/torrentadditiondlg.ui b/src/torrentadditiondlg.ui index 6353a698c..b91efd640 100644 --- a/src/torrentadditiondlg.ui +++ b/src/torrentadditiondlg.ui @@ -190,6 +190,12 @@ Qt::Horizontal + + + 0 + 0 + + @@ -217,6 +223,12 @@ Qt::Horizontal + + + 0 + 0 + + @@ -238,6 +250,12 @@ Qt::Horizontal + + + 0 + 0 + + @@ -263,6 +281,13 @@ + + + + Remember last used folder + + +