Skip to content

Commit

Permalink
[ui] GraphEditor: Updated bounding box to look at the actual node ite…
Browse files Browse the repository at this point in the history
…m rather than the loader delegate
  • Loading branch information
waaake committed Dec 18, 2024
1 parent 1a5c790 commit e73c4df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion meshroom/ui/qml/GraphEditor/GraphEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1384,9 +1384,11 @@ Item {
if (first === null) {
return Qt.rect(0, 0, 0, 0)
}
// Fetch the actual delegate item from the Loader
first = first.item;
var bbox = Qt.rect(first.x, first.y, first.x + first.width, first.y + first.height)
for (var i = 0; i < root.graph.nodes.count; ++i) {
var item = nodeRepeater.itemAt(i)
var item = nodeRepeater.itemAt(i).item
bbox.x = Math.min(bbox.x, item.x)
bbox.y = Math.min(bbox.y, item.y)
bbox.width = Math.max(bbox.width, item.x + item.width)
Expand Down

0 comments on commit e73c4df

Please sign in to comment.