diff options
author | Eduardo M. Fleury <eduardo.fleury@openbossa.org> | 2009-06-22 15:27:31 (GMT) |
---|---|---|
committer | Eduardo M. Fleury <eduardo.fleury@openbossa.org> | 2009-07-22 18:04:31 (GMT) |
commit | 92bca69c15898dd504f96e18227a22566038154a (patch) | |
tree | 4915c0b4021943cc2d7f140baad9f5a5921180da /src/gui/graphicsview/qgraphicsanchorlayout.cpp | |
parent | b7150b21f02435abb8f7a4d94b929ecdad2ef79b (diff) | |
download | Qt-92bca69c15898dd504f96e18227a22566038154a.zip Qt-92bca69c15898dd504f96e18227a22566038154a.tar.gz Qt-92bca69c15898dd504f96e18227a22566038154a.tar.bz2 |
QGraphicsAnchorLayout: Fix QGraphicsItem reparent code
Using QGraphicsLayoutPrivate methods for proper reparenting of
items. This makes it work in cases where nested layouts are used.
Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
Diffstat (limited to 'src/gui/graphicsview/qgraphicsanchorlayout.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsanchorlayout.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp index 1a72ace..a86626b 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp @@ -105,11 +105,11 @@ void QGraphicsAnchorLayout::anchor(QGraphicsLayoutItem *firstItem, // Ensure that the internal anchors have been created for both items. if (firstItem != this && !d->items.contains(firstItem)) { d->createItemEdges(firstItem); - d->addChildItem(firstItem); + d->addChildLayoutItem(firstItem); } if (secondItem != this && !d->items.contains(secondItem)) { d->createItemEdges(secondItem); - d->addChildItem(secondItem); + d->addChildLayoutItem(secondItem); } // Use heuristics to find out what the user meant with this anchor. |