diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2011-04-28 13:58:12 +0200 |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2011-05-12 15:51:02 +0200 |
commit | 1625b25a9f172254c9121a66df9f9e9acaaf89fd (patch) | |
tree | 023cb7b08e08c70f6a4eb39ca687305a50f16864 /src | |
parent | 446a7ba4ff1bbb3aeafb86eb318aa5f34f327edd (diff) |
Revert "Fix double painting when adding an item into a linear layout"
(It did not really fix the issue.)
This reverts commit 33f525e636ef8fa64a15d3e66c56adaea0075bda.
Conflicts:
src/gui/graphicsview/qgraphicslinearlayout.cpp
tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
(cherry picked from commit fee052e3e37b3335fe563cb8a1881bf59f9e25d0)
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/graphicsview/qgraphicslinearlayout.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gui/graphicsview/qgraphicslinearlayout.cpp b/src/gui/graphicsview/qgraphicslinearlayout.cpp index 1229379ee8..40f9b1de71 100644 --- a/src/gui/graphicsview/qgraphicslinearlayout.cpp +++ b/src/gui/graphicsview/qgraphicslinearlayout.cpp @@ -275,15 +275,12 @@ void QGraphicsLinearLayout::insertItem(int index, QGraphicsLayoutItem *item) qWarning("QGraphicsLinearLayout::insertItem: cannot insert itself"); return; } - d->addChildLayoutItem(item); + Q_ASSERT(item); d->fixIndex(&index); d->engine.insertRow(index, d->orientation); new QGridLayoutItem(&d->engine, item, d->gridRow(index), d->gridColumn(index), 1, 1, 0, index); - //the order of the following instructions is very important because - //invalidating the layout before adding the child item will make the layout happen - //before we try to paint the item invalidate(); } |