Chartspace scene resize when spanning into empty column

.. when you extend a tile across an empty column to the right
   the scene was not being resized to take this into account.
This commit is contained in:
Mark Liversedge
2021-07-28 10:25:22 +01:00
parent 360bc29d52
commit 0ffca019ea

View File

@@ -482,7 +482,13 @@ ChartSpace::updateGeometry()
}
// set the scene rectangle, columns start at 0
sceneRect = QRectF(0, 0, columns[column] + x + SPACING, maxy);
// bearing in mind we may have a spanner that extends across
// columns, so lets check that too?
x = x + columns[column];
foreach(QRectF spanner, spanners) {
if (spanner.topRight().x() > x) x = spanner.topRight().x();
}
sceneRect = QRectF(0, 0, x + SPACING, maxy);
if (animated) group->start();
}