diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-01-10 18:30:21 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-01-10 18:30:22 +0100 |
commit | f096d8925aae9e0485b250c65585368fb6384a4f (patch) | |
tree | cb6e20c2bc4cdff563a5876e35df73e5afb66752 /src/layouts | |
parent | 73557b37df1a5cb7d9c08025a9307e7b975d4c59 (diff) | |
parent | 08a32dff66a89fb517e86d3a2232407bd37fb715 (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I2491c91285196583e784033e78757743bfa2a423
Diffstat (limited to 'src/layouts')
-rw-r--r-- | src/layouts/qquicklinearlayout.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/layouts/qquicklinearlayout.cpp b/src/layouts/qquicklinearlayout.cpp index bc77cd437..2e9c3536e 100644 --- a/src/layouts/qquicklinearlayout.cpp +++ b/src/layouts/qquicklinearlayout.cpp @@ -723,6 +723,9 @@ void QQuickGridLayout::insertLayoutItems() Q_ASSERT(columnSpan >= 1); Q_ASSERT(rowSpan >= 1); + const int sp = span[flowOrientation]; + if (sp > flowBound) + return; if (row >= 0) nextRow = row; @@ -745,7 +748,7 @@ void QQuickGridLayout::insertLayoutItems() bool cellAcceptsItem; while (true) { // Check if the item does not span beyond the layout bound - cellAcceptsItem = (flowColumn + span[flowOrientation]) <= flowBound; + cellAcceptsItem = (flowColumn + sp) <= flowBound; // Check if all the required cells are not taken for (int rs = 0; cellAcceptsItem && rs < rowSpan; ++rs) { |