fix right click delete (or other action) when other node is activated

This commit is contained in:
azivner 2018-10-31 18:13:08 +01:00
parent 4858f0bec6
commit 5cc91c64a3

View File

@ -126,6 +126,13 @@ const contextMenuOptions = {
// Activate node on right-click
node.setActive();
// right click resets selection to just this node
// this is important when e.g. you right click on a note while having different note active
// and then click on delete - obviously you want to delete only that one right-clicked
node.setSelected(true);
treeService.clearSelectedNodes();
// Disable tree keyboard handling
ui.menu.prevKeyboard = node.tree.options.keyboard;
node.tree.options.keyboard = false;