Skip to content

Commit

Permalink
Fix creation of empty notes at note root folder when importing Everno…
Browse files Browse the repository at this point in the history
…te enex files into a note sub-folder for #1212
  • Loading branch information
pbek committed May 29, 2019
1 parent cb47446 commit 280a62d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/dialogs/evernoteimportdialog.cpp
Expand Up @@ -542,12 +542,13 @@ void EvernoteImportDialog::importNotes(QString data) {
Note note = Note();
// note.setName(title);
note.setNoteText(noteText);
note.setNoteSubFolderId(noteSubFolder.getId());

// in case the user enabled that the filename can be different
// from the note name
// Attention: may already store the note
note.handleNoteTextFileName();

note.setNoteSubFolderId(noteSubFolder.getId());
note.store();
note.storeNoteTextFileToDisk();

Expand Down
5 changes: 4 additions & 1 deletion src/mainwindow.cpp
Expand Up @@ -9748,7 +9748,10 @@ void MainWindow::selectAllNotesInTagTreeWidget() const {
}

void MainWindow::on_actionImport_notes_from_Evernote_triggered() {
EvernoteImportDialog* dialog = new EvernoteImportDialog(this);
const QSignalBlocker blocker(noteDirectoryWatcher);
Q_UNUSED(blocker);

auto dialog = new EvernoteImportDialog(this);
dialog->exec();

if (dialog->getImportCount() > 0) {
Expand Down

0 comments on commit 280a62d

Please sign in to comment.