diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-07-19 01:47:16 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2010-07-19 10:19:21 (GMT) |
commit | bb28f2217bae0a1e5f7645993a4a2540195eaeb6 (patch) | |
tree | 3d1210600d269dacb673b63e3267f401a77bf9b1 /src | |
parent | 1773ebf6adccabe69280b7fbd3feb856ce2d779c (diff) | |
download | Qt-bb28f2217bae0a1e5f7645993a4a2540195eaeb6.zip Qt-bb28f2217bae0a1e5f7645993a4a2540195eaeb6.tar.gz Qt-bb28f2217bae0a1e5f7645993a4a2540195eaeb6.tar.bz2 |
Missed the actual change in 5572ec653fe735c4f413195c1ef34382aa8c6105
Always place PathView delegates centered on the path
The scale of the delegate was used to offset the item. This was a
bad way of making the item appear to be positioned correctly when
the default transform origin was the top-left. Now that transform origin
is center, it is obvious that it was a bad idea.
Task-number: QTBUG-12245
Reviewed-by: Michael Brasser
(cherry picked from commit 19473443dbeff4a57cd6ec6572ca29c2e70d672c)
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativepathview.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index 0e980b3..b23a3c3 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -284,8 +284,8 @@ void QDeclarativePathViewPrivate::updateItem(QDeclarativeItem *item, qreal perce att->setValue(attr.toUtf8(), path->attributeAt(attr, percent)); } QPointF pf = path->pointAt(percent); - item->setX(qRound(pf.x() - item->width()*item->scale()/2)); - item->setY(qRound(pf.y() - item->height()*item->scale()/2)); + item->setX(qRound(pf.x() - item->width()/2)); + item->setY(qRound(pf.y() - item->height()/2)); } void QDeclarativePathViewPrivate::regenerate() |