editor: tree shift+click: avoid duplicates in selection

This commit is contained in:
bordun 2021-03-09 16:56:19 +01:00
parent bad0baa4e1
commit 6335ffd930

View file

@ -44,7 +44,7 @@ var handleClick = function(event) {
var siblings = targetWidget.parent.children,
from = siblings.indexOf(editor.selectedWidgets[0]),
to = siblings.indexOf(targetWidget),
range = siblings.slice(Math.min(from, to), Math.max(from, to) + 1)
range = siblings.slice(Math.min(from, to), Math.max(from, to) + 1).filter(w=>!editor.selectedWidgets.includes(w))
targetWidget = editor.selectedWidgets.concat(range)
}