summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2017-02-01 20:35:52 +0100
committerPaul Davis <paul@linuxaudiosystems.com>2017-02-01 21:58:20 +0100
commitfa2c4c525b9f5f302beafac8eeea4e700fbf90f2 (patch)
tree15a3e6ca3e2b3cc77a0d0dbddeefbbe362cf139e /libs
parent94443bab7ea163576764027b2d583d8db88cbce7 (diff)
canvas::grid : compute all row/col extents
Diffstat (limited to 'libs')
-rw-r--r--libs/canvas/grid.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/canvas/grid.cc b/libs/canvas/grid.cc
index 15d57b4886..e5d05e9f05 100644
--- a/libs/canvas/grid.cc
+++ b/libs/canvas/grid.cc
@@ -184,13 +184,13 @@ Grid::reposition_children ()
uint32_t max_col = 0;
/* since we encourage dynamic and essentially random placement of
- * children, begin by determining the maximum row and column given
+ * children, begin by determining the maximum row and column extents given
* our current set of children and placements.
*/
for (CoordsByItem::const_iterator c = coords_by_item.begin(); c != coords_by_item.end(); ++c) {
- max_col = max (max_col, (uint32_t) c->second.x);
- max_row = max (max_row, (uint32_t) c->second.y);
+ max_col = max (max_col, (uint32_t) (c->second.x + c->second.col_span));
+ max_row = max (max_row, (uint32_t) (c->second.y + c->second.row_span));
}
max_row++;