mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 20:58:07 -06:00
Now qbt remembers the last used folder. Fixes #799697. ver2
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user