ctrl+click doesn't activate the node and selects only if it's not selected yet, otherwise deselects

This commit is contained in:
azivner 2018-01-03 22:54:13 -05:00
parent 01ede22504
commit f2aaf8b0a3

View File

@ -534,13 +534,15 @@ const noteTree = (function() {
const node = data.node; const node = data.node;
if (targetType === 'title' || targetType === 'icon') { if (targetType === 'title' || targetType === 'icon') {
node.setActive();
if (!event.ctrlKey) { if (!event.ctrlKey) {
node.setActive();
node.setSelected(true);
clearSelectedNodes(); clearSelectedNodes();
} }
else {
node.setSelected(true); node.setSelected(!node.isSelected());
}
return false; return false;
} }