summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativepath.cpp
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-04-29 04:23:49 (GMT)
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-04-29 04:43:08 (GMT)
commit6e061ee6bd2f516e6ae6ed8035fe7afe5abd5566 (patch)
tree7ef551c51f0f7d97a88650c5d5f31334f2ac7569 /src/declarative/graphicsitems/qdeclarativepath.cpp
parentf5287ee035fe0c218de47b77038b881d9c857110 (diff)
downloadQt-6e061ee6bd2f516e6ae6ed8035fe7afe5abd5566.zip
Qt-6e061ee6bd2f516e6ae6ed8035fe7afe5abd5566.tar.gz
Qt-6e061ee6bd2f516e6ae6ed8035fe7afe5abd5566.tar.bz2
Fix path view update on startX(Y) changes in qml
Task-number: QTBUG-10290 Reviewed-by: Michael Brasser
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativepath.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativepath.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepath.cpp b/src/declarative/graphicsitems/qdeclarativepath.cpp
index e2042fc..e867a52 100644
--- a/src/declarative/graphicsitems/qdeclarativepath.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepath.cpp
@@ -117,6 +117,7 @@ void QDeclarativePath::setStartX(qreal x)
return;
d->startX = x;
emit startXChanged();
+ processPath();
}
qreal QDeclarativePath::startY() const
@@ -132,6 +133,7 @@ void QDeclarativePath::setStartY(qreal y)
return;
d->startY = y;
emit startYChanged();
+ processPath();
}
/*!
@@ -220,6 +222,9 @@ void QDeclarativePath::processPath()
{
Q_D(QDeclarativePath);
+ if (!d->componentComplete)
+ return;
+
d->_pointCache.clear();
d->_attributePoints.clear();
d->_path = QPainterPath();
@@ -284,10 +289,18 @@ void QDeclarativePath::processPath()
emit changed();
}
+void QDeclarativePath::classBegin()
+{
+ Q_D(QDeclarativePath);
+ d->componentComplete = false;
+}
+
void QDeclarativePath::componentComplete()
{
Q_D(QDeclarativePath);
QSet<QString> attrs;
+ d->componentComplete = true;
+
// First gather up all the attributes
foreach (QDeclarativePathElement *pathElement, d->_pathElements) {
if (QDeclarativePathAttribute *attribute =