mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-04 01:08:26 +02:00
Merge pull request #167 from alicevision/fix_boundingBox
GraphLayout: fix bouding box computation
This commit is contained in:
commit
9864093568
2 changed files with 2 additions and 2 deletions
|
@ -154,7 +154,7 @@ class GraphLayout(QObject):
|
|||
if nodes is None:
|
||||
nodes = self.graph.nodes.values()
|
||||
first = nodes[0]
|
||||
bbox = [first.x, first.y, 1, 1]
|
||||
bbox = [first.x, first.y, first.x + self._nodeWidth, first.y + self._nodeHeight]
|
||||
for n in nodes:
|
||||
bbox[0] = min(bbox[0], n.x)
|
||||
bbox[1] = min(bbox[1], n.y)
|
||||
|
|
|
@ -415,7 +415,7 @@ Item {
|
|||
function boundingBox()
|
||||
{
|
||||
var first = nodeRepeater.itemAt(0)
|
||||
var bbox = Qt.rect(first.x, first.y, 1, 1)
|
||||
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)
|
||||
bbox.x = Math.min(bbox.x, item.x)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue