diff options
author | Jan Arve Saether <jan-arve.saether@digia.com> | 2013-04-02 14:35:47 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-03 14:52:25 +0200 |
commit | 4f072e2d3d7e429359ff15a615d02712bff7ee51 (patch) | |
tree | 790d72ab988c44bfcbb18d576e027d6b2b1cb326 /src/widgets/graphicsview/qgridlayoutengine.cpp | |
parent | 52ebf1f1914cea563b52baffc607407dbc6a7313 (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
Change-Id: Ief0e7018ee8e5ee36272ce075a43312ffeac7b91
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Diffstat (limited to 'src/widgets/graphicsview/qgridlayoutengine.cpp')
-rw-r--r-- | src/widgets/graphicsview/qgridlayoutengine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/graphicsview/qgridlayoutengine.cpp b/src/widgets/graphicsview/qgridlayoutengine.cpp index adb13687db..945cce1101 100644 --- a/src/widgets/graphicsview/qgridlayoutengine.cpp +++ b/src/widgets/graphicsview/qgridlayoutengine.cpp @@ -1475,7 +1475,7 @@ void QGridLayoutEngine::fillRowData(QGridLayoutRowData *rowData, const QLayoutSt int effectiveRowSpan = 1; for (int i = 1; i < itemRowSpan; ++i) { - if (!rowData->ignore.testBit(i)) + if (!rowData->ignore.testBit(i + itemRow)) ++effectiveRowSpan; } |