diff options
author | Eduardo M. Fleury <eduardo.fleury@openbossa.org> | 2009-05-28 18:48:44 (GMT) |
---|---|---|
committer | Eduardo M. Fleury <eduardo.fleury@openbossa.org> | 2009-07-22 18:04:14 (GMT) |
commit | a5e99a6812e8a721dac29554ebcaa92c6d3fdd3a (patch) | |
tree | ec171d8d8f5c091bea5945418f679c248fec4a46 /src/gui/graphicsview/qgraphicsanchorlayout.cpp | |
parent | 35f33618ec766e4922977c31a5f522c261b19c61 (diff) | |
download | Qt-a5e99a6812e8a721dac29554ebcaa92c6d3fdd3a.zip Qt-a5e99a6812e8a721dac29554ebcaa92c6d3fdd3a.tar.gz Qt-a5e99a6812e8a721dac29554ebcaa92c6d3fdd3a.tar.bz2 |
QGraphicsAnchorLayout: Bugfix in spacing() method
In the public Qt::Orientation enum, Horizontal and Vertical mean
0x1 and 0x2 respectivelly, this was causing the internal data
structure to be accessed in positions 0 and 2 instead of 0 and 1.
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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp index 631ce0c..166e6f2 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp @@ -172,7 +172,8 @@ void QGraphicsAnchorLayout::setSpacing(qreal spacing, Qt::Orientations orientati qreal QGraphicsAnchorLayout::spacing(Qt::Orientation orientation) const { Q_D(const QGraphicsAnchorLayout); - return d->spacing[orientation & Qt::Vertical]; + // Qt::Horizontal == 0x1, Qt::Vertical = 0x2 + return d->spacing[orientation - 1]; } void QGraphicsAnchorLayout::setGeometry(const QRectF &geom) |