cloning is now done without reloading the whole tree

This commit is contained in:
zadam
2019-03-18 22:33:19 +01:00
parent 3f656ea76f
commit ca0d17d93a
6 changed files with 52 additions and 27 deletions

View File

@@ -46,6 +46,8 @@ async function pasteInto(node) {
await treeChangesService.moveToNode(nodes, node);
await node.setExpanded(true);
clipboardIds = [];
clipboardMode = null;
}
@@ -53,6 +55,9 @@ async function pasteInto(node) {
for (const noteId of clipboardIds) {
await cloningService.cloneNoteTo(noteId, node.data.noteId);
}
await node.setExpanded(true);
// copy will keep clipboardIds and clipboardMode so it's possible to paste into multiple places
}
else if (clipboardIds.length === 0) {