summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@theqtcompany.com>2014-12-09 13:26:18 +0100
committerJan Arve Sæther <jan-arve.saether@theqtcompany.com>2014-12-09 16:58:58 +0100
commitc9db6e52bc9bd9731159fcb4e95fca5cba01bc9c (patch)
tree9bd7f512438fa6f0314ed2fdba79673b46bc6470 /src/gui
parent68d528654f0b1e488498b9a44381ff2d809492e3 (diff)
Fixed a bug where spans did not always work in layouts.
The problem was that the span we stored in the multiCellMap was the "effective" span (i.e. the given span subtracted with the number of ignored rows it would span). Later we used that span to distribute its size across all its cells. However, since the span now could be smaller that the given span, we could sometimes fail to distribute to the last span(s). [ChangeLog][QtWidgets][layouts] Fixed a bug where spans sometimes didn't distribute themselves to the last cells they covered. Change-Id: I31db3d850484dc8b70d62c5f02f680740578c661 Task-number: QTBUG-43099 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/util/qgridlayoutengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/util/qgridlayoutengine.cpp b/src/gui/util/qgridlayoutengine.cpp
index 43d1ed3b6c..b58096a231 100644
--- a/src/gui/util/qgridlayoutengine.cpp
+++ b/src/gui/util/qgridlayoutengine.cpp
@@ -1367,7 +1367,7 @@ void QGridLayoutEngine::fillRowData(QGridLayoutRowData *rowData,
rowStretch = qMax(rowStretch, itemStretch);
} else {
QGridLayoutMultiCellData &multiCell =
- rowData->multiCellMap[qMakePair(row, effectiveRowSpan)];
+ rowData->multiCellMap[qMakePair(row, itemRowSpan)];
box = &multiCell.q_box;
multiCell.q_stretch = itemStretch;
}