From cf16a9db545e0b0fc63edcab521cdc60be0c4161 Mon Sep 17 00:00:00 2001 From: waaake Date: Wed, 18 Dec 2024 12:41:55 +0530 Subject: [PATCH] [ui] GraphEditor: Updated bounding box to look at the actual node item rather than the loader delegate --- meshroom/ui/qml/GraphEditor/GraphEditor.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meshroom/ui/qml/GraphEditor/GraphEditor.qml b/meshroom/ui/qml/GraphEditor/GraphEditor.qml index 54c6259f2c..e2592e52e3 100755 --- a/meshroom/ui/qml/GraphEditor/GraphEditor.qml +++ b/meshroom/ui/qml/GraphEditor/GraphEditor.qml @@ -1386,9 +1386,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)