mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-29 10:17:27 +02:00
[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:
parent
5a003604fb
commit
499c99469e
1 changed files with 9 additions and 0 deletions
|
@ -25,6 +25,15 @@ SelectionBox {
|
||||||
const delegateRect = Qt.rect(delegate.x, delegate.y, delegate.width, delegate.height);
|
const delegateRect = Qt.rect(delegate.x, delegate.y, delegate.width, delegate.height);
|
||||||
if (Geom2D.rectRectIntersect(mappedSelectionRect, delegateRect)) {
|
if (Geom2D.rectRectIntersect(mappedSelectionRect, delegateRect)) {
|
||||||
selectedIndices.push(i);
|
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);
|
delegateSelectionEnded(selectedIndices, modifiers);
|
||||||
|
|
Loading…
Add table
Reference in a new issue