diff options
author | Alexis Menard <alexis.menard@nokia.com> | 2010-03-18 05:08:29 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2010-03-23 03:29:34 (GMT) |
commit | d9c5d0698109c39547ee23a883b88a48a4f9f8e1 (patch) | |
tree | 9b6daed0bab9352efd2a76eb3ec4763d97df4e0e /src/gui/graphicsview/qgraphicsitem.cpp | |
parent | 9973d39d7eb4461c79774aee420a4996051ffbfc (diff) | |
download | Qt-d9c5d0698109c39547ee23a883b88a48a4f9f8e1.zip Qt-d9c5d0698109c39547ee23a883b88a48a4f9f8e1.tar.gz Qt-d9c5d0698109c39547ee23a883b88a48a4f9f8e1.tar.bz2 |
Calling setX and setY should send itemSendGeometry/ScenePositionChanged events
SetX and setY were calling setPosHelper directly therefore events for
itemSendGeometryChange and itemSendScenePositionChange were not sent
properly.
Task-number:QTBUG-9093
Reviewed-by:janarve
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 3c255ef..3a6647c 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -3482,7 +3482,7 @@ void QGraphicsItem::setX(qreal x) if (qIsNaN(x)) return; - d_ptr->setPosHelper(QPointF(x, d_ptr->pos.y())); + setPos(QPointF(x, d_ptr->pos.y())); } /*! @@ -3509,7 +3509,7 @@ void QGraphicsItem::setY(qreal y) if (qIsNaN(y)) return; - d_ptr->setPosHelper(QPointF(d_ptr->pos.x(), y)); + setPos(QPointF(d_ptr->pos.x(), y)); } /*! @@ -3577,7 +3577,7 @@ void QGraphicsItem::setPos(const QPointF &pos) return; // Update and repositition. - if (!(d_ptr->flags & ItemSendsGeometryChanges)) { + if (!(d_ptr->flags & ItemSendsGeometryChanges) && !(d_ptr->flags & ItemSendsScenePositionChanges)) { d_ptr->setPosHelper(pos); return; } |