summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEduardo M. Fleury <eduardo.fleury@openbossa.org>2009-05-28 21:36:11 (GMT)
committerEduardo M. Fleury <eduardo.fleury@openbossa.org>2009-07-22 18:04:04 (GMT)
commit7aa43c713b99905036c5118e2031de1017663741 (patch)
tree4830ee268b3cebf20f0dd3f416a5e3f021ea3f74 /src
parentd61d477d2487bdc5c1fc854106a82450b613673f (diff)
downloadQt-7aa43c713b99905036c5118e2031de1017663741.zip
Qt-7aa43c713b99905036c5118e2031de1017663741.tar.gz
Qt-7aa43c713b99905036c5118e2031de1017663741.tar.bz2
QGraphicsAnchorLayout: Bugfix, set skipInPreferred flag for vertical
We don't want the layout internal anchors to be used in the preferred size calculation, therefore we must set this flag. It was already being set for horizontal edges but for the vertical ones this was missing. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
Diffstat (limited to 'src')
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout_p.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
index 84d1c31..c95baa3 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
+++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
@@ -157,11 +157,13 @@ void QGraphicsAnchorLayoutPrivate::createLayoutEdges()
data = new AnchorData(0, 0, QWIDGETSIZE_MAX);
addAnchor(layout, QGraphicsAnchorLayout::Top, layout,
QGraphicsAnchorLayout::VCenter, data);
+ data->skipInPreferred = 1;
c->variables.insert(data, 1.0);
data = new AnchorData(0, 0, QWIDGETSIZE_MAX);
addAnchor(layout, QGraphicsAnchorLayout::VCenter,
layout, QGraphicsAnchorLayout::Bottom, data);
+ data->skipInPreferred = 1;
c->variables.insert(data, -1.0);
itemCenterConstraints[Vertical].append(c);