summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview/qgraphicslinearlayout.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2011-05-16 10:19:02 +0200
committerLars Knoll <lars.knoll@nokia.com>2011-05-16 10:19:02 +0200
commit276d60a4d6c9d1b72c4aa7df1f86e7ce9097beeb (patch)
tree73130ce8a80181fb9d234028c5057d7eb86f02ab /src/widgets/graphicsview/qgraphicslinearlayout.cpp
parent850b602c7a72635eb37a998089ee085d5d505c34 (diff)
parent173099696f44073441975febfa35ddfb3585e8c5 (diff)
Merge remote branch 'origin/master' into refactor
Conflicts: src/modules/qt_openvg.pri src/widgets/to_be_moved/qlinecontrol_p.h
Diffstat (limited to 'src/widgets/graphicsview/qgraphicslinearlayout.cpp')
-rw-r--r--src/widgets/graphicsview/qgraphicslinearlayout.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/widgets/graphicsview/qgraphicslinearlayout.cpp b/src/widgets/graphicsview/qgraphicslinearlayout.cpp
index 5591638395..40f9b1de71 100644
--- a/src/widgets/graphicsview/qgraphicslinearlayout.cpp
+++ b/src/widgets/graphicsview/qgraphicslinearlayout.cpp
@@ -275,17 +275,13 @@ void QGraphicsLinearLayout::insertItem(int index, QGraphicsLayoutItem *item)
qWarning("QGraphicsLinearLayout::insertItem: cannot insert itself");
return;
}
- Q_ASSERT(item);
-
- //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();
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);
+ invalidate();
}
/*!