Skip to content

Commit

Permalink
[ui] DelegateSelectionBox: Fetch children indices when box selecting …
Browse files Browse the repository at this point in the history
…backdrops

This allows selecting children explicitly during this call rather than implicitly invoking select children which was inducing a binding loop on selection property
  • Loading branch information
waaake committed Feb 11, 2025
1 parent f3b5d7d commit 068e9fa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions meshroom/ui/qml/Controls/DelegateSelectionBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 068e9fa

Please sign in to comment.