trigger execute bulk actions

This commit is contained in:
zadam
2022-06-12 00:05:46 +02:00
parent 041b4ea442
commit 63f0e441b9
6 changed files with 48 additions and 6 deletions

View File

@@ -130,7 +130,17 @@ class TreeContextMenu {
this.treeWidget.triggerCommand("openNewNoteSplit", {ntxId, notePath});
}
else {
this.treeWidget.triggerCommand(command, {node: this.node, notePath: notePath});
const selectedOrActiveBranchIds = this.treeWidget.getSelectedOrActiveBranchIds(this.node);
const selectedOrActiveNoteIds = selectedOrActiveBranchIds
.map(branchId => froca.getBranch(branchId).noteId)
.filter(noteId => !!noteId);
this.treeWidget.triggerCommand(command, {
node: this.node,
notePath: notePath,
selectedOrActiveBranchIds,
selectedOrActiveNoteIds
});
}
}
}