summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2011-04-28 11:58:12 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2011-04-28 12:37:05 (GMT)
commitfee052e3e37b3335fe563cb8a1881bf59f9e25d0 (patch)
tree19cb8ad99d9cdcd0440d1a7767976a29d64ffc28 /src/gui/graphicsview
parentd5ee1bc752dc8aed717776a80e9e15972dd98065 (diff)
downloadQt-fee052e3e37b3335fe563cb8a1881bf59f9e25d0.zip
Qt-fee052e3e37b3335fe563cb8a1881bf59f9e25d0.tar.gz
Qt-fee052e3e37b3335fe563cb8a1881bf59f9e25d0.tar.bz2
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
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicslinearlayout.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gui/graphicsview/qgraphicslinearlayout.cpp b/src/gui/graphicsview/qgraphicslinearlayout.cpp
index 1229379..40f9b1d 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();
}