diff options
author | J-P Nurmi <jari-pekka.nurmi@nokia.com> | 2010-10-18 09:04:04 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2010-10-18 09:04:04 (GMT) |
commit | 0d3c17fc672a762085f74d0e436ef842370729ec (patch) | |
tree | bb4327d4cda80a617b1a2b747ea557ba9f337d92 /src/gui | |
parent | 01e375731c839c9f2bd6ec94e1f2157340925efe (diff) | |
download | Qt-0d3c17fc672a762085f74d0e436ef842370729ec.zip Qt-0d3c17fc672a762085f74d0e436ef842370729ec.tar.gz Qt-0d3c17fc672a762085f74d0e436ef842370729ec.tar.bz2 |
Fixed QGraphicsItem to send ItemScenePositionHasChanged when appropriate
Task-number: QTBUG-13473
Merge-request: 812
Reviewed-by: Alexis Menard <alexis.menard@nokia.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index e63acac..2b6aaf5 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -3706,6 +3706,8 @@ void QGraphicsItem::setPos(const QPointF &pos) d_ptr->setPosHelper(pos); if (d_ptr->isWidget) static_cast<QGraphicsWidget *>(this)->d_func()->setGeometryFromSetPos(); + if (d_ptr->scenePosDescendants) + d_ptr->sendScenePosChange(); return; } @@ -4388,8 +4390,10 @@ void QGraphicsItem::setTransform(const QTransform &matrix, bool combine) return; // Update and set the new transformation. - if (!(d_ptr->flags & ItemSendsGeometryChanges)) { + if (!(d_ptr->flags & (ItemSendsGeometryChanges | ItemSendsScenePositionChanges))) { d_ptr->setTransformHelper(newTransform); + if (d_ptr->scenePosDescendants) + d_ptr->sendScenePosChange(); return; } |