summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@digia.com>2013-04-02 14:35:47 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-04 14:41:44 +0200
commit1112b5ca9b448ce26cdd9eb7cc67abc7f9d537d8 (patch)
tree98a3bde2ce1a58591d3ce42bcfe653f1dad645a1 /src/gui
parentaae206bd70e581f9ba2756e22f7f838d2ae2d1b6 (diff)
downloadqt4-tools-1112b5ca9b448ce26cdd9eb7cc67abc7f9d537d8.tar.gz
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 (cherry picked from qtbase/f9e43c526a30ae3912adfe3d5cb781af5ddda4b0) Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/graphicsview/qgridlayoutengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgridlayoutengine.cpp b/src/gui/graphicsview/qgridlayoutengine.cpp
index 8e6b1492b6..99adb4a86a 100644
--- a/src/gui/graphicsview/qgridlayoutengine.cpp
+++ b/src/gui/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;
}