summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-07-19 01:47:16 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-07-19 01:47:16 (GMT)
commit19473443dbeff4a57cd6ec6572ca29c2e70d672c (patch)
treea0ad17dde4bcbac0ab180b3b1c2cde35cb3cbefe
parente2cb220eb67455f1041cf8ac863a5da4421ab424 (diff)
downloadQt-19473443dbeff4a57cd6ec6572ca29c2e70d672c.zip
Qt-19473443dbeff4a57cd6ec6572ca29c2e70d672c.tar.gz
Qt-19473443dbeff4a57cd6ec6572ca29c2e70d672c.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
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
index f4ebd13..acf9827 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()