File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 11# QOwnNotes Changelog
22
3+ ## 26.1.2
4+
5+ - The **Joplin Import Dialog** now remembers the last selected directory
6+ - The directory path is automatically restored when reopening the dialog
7+ - The directory is only restored if it still exists on disk
8+
39## 26.1.1
410
511- **Notes and note folders can now be deleted together** in a single operation when enabling
Original file line number Diff line number Diff line change @@ -46,6 +46,15 @@ JoplinImportDialog::JoplinImportDialog(QWidget* parent)
4646 ui->attachmentImportCheckBox ->setChecked (
4747 settings.value (QStringLiteral (" JoplinImport/AttachmentImportCheckBoxChecked" ), true )
4848 .toBool ());
49+
50+ // Load the last selected directory
51+ QString lastDirectory = settings.value (QStringLiteral (" JoplinImport/LastDirectory" )).toString ();
52+ if (!lastDirectory.isEmpty ()) {
53+ QDir dir (lastDirectory);
54+ if (dir.exists ()) {
55+ ui->directoryLineEdit ->setText (lastDirectory);
56+ }
57+ }
4958}
5059
5160JoplinImportDialog::~JoplinImportDialog () {
@@ -61,6 +70,12 @@ JoplinImportDialog::~JoplinImportDialog() {
6170 settings.setValue (QStringLiteral (" JoplinImport/AttachmentImportCheckBoxChecked" ),
6271 ui->attachmentImportCheckBox ->isChecked ());
6372
73+ // Save the last selected directory
74+ QString currentDirectory = ui->directoryLineEdit ->text ();
75+ if (!currentDirectory.isEmpty ()) {
76+ settings.setValue (QStringLiteral (" JoplinImport/LastDirectory" ), currentDirectory);
77+ }
78+
6479 delete ui;
6580}
6681
You can’t perform that action at this time.
0 commit comments