[ui] DelegateSelectionBox: Fetch children indices when box selecting backdrops

This allows selecting children explicitly during this call rather than implicitly invoking select children which was inducing a binding loop on selection property
This commit is contained in:
waaake 2025-02-11 10:18:30 +05:30
parent 5a003604fb
commit 499c99469e

View file

@ -25,6 +25,15 @@ SelectionBox {
const delegateRect = Qt.rect(delegate.x, delegate.y, delegate.width, delegate.height);
if (Geom2D.rectRectIntersect(mappedSelectionRect, delegateRect)) {
selectedIndices.push(i);
// Check if the node is a backdrop
// If so add all of it's children indices as well
if (delegate.isBackdrop) {
let children = delegate.getChildrenIndices(true);
for (var c = 0; c < children.length; c++) {
selectedIndices.push(children[c]);
}
}
}
}
delegateSelectionEnded(selectedIndices, modifiers);