File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 55- The **Joplin Import Dialog** now remembers the last selected directory
66 - The directory path is automatically restored when reopening the dialog
77 - The directory is only restored if it still exists on disk
8+ - The **Evernote Import Dialog** now remembers the last selected ENEX file
9+ - The file path is automatically restored when reopening the dialog
10+ - The file is only restored if it still exists on disk
811
912## 26.1.1
1013
Original file line number Diff line number Diff line change @@ -36,6 +36,15 @@ EvernoteImportDialog::EvernoteImportDialog(QWidget *parent)
3636 ui->attachmentImportCheckBox ->setChecked (
3737 settings.value (QStringLiteral (" EvernoteImport/AttachmentImportCheckBoxChecked" ), true )
3838 .toBool ());
39+
40+ // Load the last selected ENEX file
41+ QString lastFile = settings.value (QStringLiteral (" EvernoteImport/LastFile" )).toString ();
42+ if (!lastFile.isEmpty ()) {
43+ QFileInfo fileInfo (lastFile);
44+ if (fileInfo.exists () && fileInfo.isFile ()) {
45+ ui->fileLineEdit ->setText (lastFile);
46+ }
47+ }
3948}
4049
4150void EvernoteImportDialog::resetNoteCount () {
@@ -51,6 +60,12 @@ EvernoteImportDialog::~EvernoteImportDialog() {
5160 settings.setValue (QStringLiteral (" EvernoteImport/AttachmentImportCheckBoxChecked" ),
5261 ui->attachmentImportCheckBox ->isChecked ());
5362
63+ // Save the last selected ENEX file
64+ QString currentFile = ui->fileLineEdit ->text ();
65+ if (!currentFile.isEmpty ()) {
66+ settings.setValue (QStringLiteral (" EvernoteImport/LastFile" ), currentFile);
67+ }
68+
5469 storeMetaDataTreeWidgetItemsCheckedState ();
5570
5671 delete ui;
You can’t perform that action at this time.
0 commit comments