Reset on system change
authorAlan Alpert <alan.alpert@nokia.com>
Tue, 13 Sep 2011 02:03:13 +0000 (12:03 +1000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 13 Sep 2011 02:57:06 +0000 (04:57 +0200)
Otherwise it tried to maintain its data, which is not useful when we
should just reset anyways.

Change-Id: Id7bbabed67d8549d4842c1e5e6bf87ba93508d62
Reviewed-on: http://codereview.qt-project.org/4705
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>

src/declarative/particles/qsgparticlepainter.cpp

index 670c1f2..aec8690 100644 (file)
@@ -95,7 +95,7 @@ void QSGParticlePainter::setSystem(QSGParticleSystem *arg)
                     this, SLOT(calcSystemOffset()));
             connect(m_system, SIGNAL(yChanged()),
                     this, SLOT(calcSystemOffset()));
-            calcSystemOffset();
+            reset();
         }
         emit systemChanged(arg);
     }