diff options
| author | Jan Arve Saether <jan-arve.saether@digia.com> | 2013-04-05 10:09:13 +0200 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-05 10:22:07 +0200 |
| commit | a077d075eafa947b48cf0824146d8dc6873b10ed (patch) | |
| tree | 39e8c5728ecc99d9c148e50d37d4951fa3c53c57 /src/layouts/qgridlayoutengine.cpp | |
| parent | fe95db7685ed943a73a5de127b3f587e42f682ff (diff) | |
Fixed a bug where spans across empty cells got broken.
If a row/column is only used only because of the spanning of an item,
the cell should be treated as it didn't exist. We keep track of this
with the "ignore" bit array.
The old code would always start from the row/column at position 1.
In the attached testcase this made the effectiveRowSpan become larger
than actually needed.
Task-number: QTBUG-30255
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Change-Id: I410ed373f408014333d3964e2ddbcfeb25bec3a6
(cherry picked from qtbase/4f072e2d3d7e429359ff15a615d02712bff7ee51)
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Diffstat (limited to 'src/layouts/qgridlayoutengine.cpp')
| -rw-r--r-- | src/layouts/qgridlayoutengine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/layouts/qgridlayoutengine.cpp b/src/layouts/qgridlayoutengine.cpp index c5a1b5ce6..f72bffe26 100644 --- a/src/layouts/qgridlayoutengine.cpp +++ b/src/layouts/qgridlayoutengine.cpp @@ -1419,7 +1419,7 @@ void QGridLayoutEngine::fillRowData(QGridLayoutRowData *rowData, int effectiveRowSpan = 1; for (int i = 1; i < itemRowSpan; ++i) { - if (!rowData->ignore.testBit(i)) + if (!rowData->ignore.testBit(i + itemRow)) ++effectiveRowSpan; } |
