Skip to content

Commit 2532de4

Browse files
committed
[ui] GraphEditor: Updated bounding box to look at the actual node item rather than the loader delegate
1 parent 95f7190 commit 2532de4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

meshroom/ui/qml/GraphEditor/GraphEditor.qml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ Item {
5353
/// Get node delegate for the given node object
5454
function nodeDelegate(node) {
5555
for(var i = 0; i < nodeRepeater.count; ++i) {
56-
if (nodeRepeater.itemAt(i).node === node)
57-
return nodeRepeater.itemAt(i)
56+
if (nodeRepeater.getItemAt(i).node === node)
57+
return nodeRepeater.getItemAt(i)
5858
}
5959
return undefined
6060
}
@@ -1375,7 +1375,7 @@ Item {
13751375

13761376
function nextItem() {
13771377
// Compute bounding box
1378-
var node = nodeRepeater.itemAt(filteredNodes.itemAt(navigation.currentIndex).index_)
1378+
var node = nodeRepeater.getItemAt(filteredNodes.itemAt(navigation.currentIndex).index_)
13791379
var bbox = Qt.rect(node.x, node.y, node.width, node.height)
13801380
// Rescale to fit the bounding box in the view, zoom is limited to prevent huge text
13811381
draggable.scale = Math.min(Math.min(root.width / bbox.width, root.height / bbox.height),maxZoom)
@@ -1395,13 +1395,13 @@ Item {
13951395
}
13961396

13971397
function boundingBox() {
1398-
var first = nodeRepeater.itemAt(0)
1398+
var first = nodeRepeater.getItemAt(0)
13991399
if (first === null) {
14001400
return Qt.rect(0, 0, 0, 0)
14011401
}
14021402
var bbox = Qt.rect(first.x, first.y, first.x + first.width, first.y + first.height)
14031403
for (var i = 0; i < root.graph.nodes.count; ++i) {
1404-
var item = nodeRepeater.itemAt(i)
1404+
var item = nodeRepeater.getItemAt(i)
14051405
bbox.x = Math.min(bbox.x, item.x)
14061406
bbox.y = Math.min(bbox.y, item.y)
14071407
bbox.width = Math.max(bbox.width, item.x + item.width)

0 commit comments

Comments
 (0)