Skip to content

Commit bf9f196

Browse files
authored
Add support for allowDifferentFileName (#132)
1 parent 5b6cb0a commit bf9f196

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

journal-entry/journal-entry.qml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,14 @@ QtObject {
130130

131131
// Create the new journal note.
132132
script.createNote(headline + "\n================\n\n" + noteBodyTemplate);
133+
134+
const currentNote = script.currentNote();
135+
136+
// rename the note file if needed
137+
if (currentNote.allowDifferentFileName()) {
138+
currentNote.renameNoteFile(headline);
139+
mainWindow.buildNotesIndexAndLoadNoteDirectoryList(false, true);
140+
}
133141

134142
// Default tags.
135143
if (defaultTags && defaultTags !== '') {

0 commit comments

Comments
 (0)