fixed CTRL-ALT-P shortcut

This commit is contained in:
azivner
2018-10-15 23:45:37 +02:00
parent 209551a205
commit 04af8a3a96
4 changed files with 13 additions and 17 deletions
+6 -3
View File
@@ -90,10 +90,13 @@ if (utils.isElectron()) {
await treeService.activateNote(parentNoteId);
setTimeout(() => {
const node = treeService.getCurrentNode();
setTimeout(async () => {
const parentNode = treeService.getCurrentNode();
const {note} = await treeService.createNote(parentNode, parentNode.data.noteId, 'into', parentNode.data.isProtected);
await treeService.activateNote(note.noteId);
treeService.createNote(node, node.data.noteId, 'into', node.data.isProtected);
}, 500);
});
}
+2
View File
@@ -522,6 +522,8 @@ async function createNote(node, parentNoteId, target, isProtected, saveSelection
clearSelectedNodes(); // to unmark previously active node
infoService.showMessage("Created!");
return {note, branch};
}
/* If first element is heading, parse it out and use it as a new heading. */