Allow affectors to be transformed
authorAlan Alpert <alan.alpert@nokia.com>
Thu, 1 Sep 2011 08:47:26 +0000 (18:47 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 8 Sep 2011 01:34:41 +0000 (03:34 +0200)
Change-Id: I4452707589d7b98709cd995569a5bf36bd5448a0
Reviewed-on: http://codereview.qt-project.org/4053
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/declarative/particles/qsgparticleaffector.cpp

index 3313106..a64b4ee 100644 (file)
@@ -117,12 +117,6 @@ QSGParticleAffector::QSGParticleAffector(QSGItem *parent) :
     QSGItem(parent), m_needsReset(false), m_system(0), m_active(true)
   , m_updateIntSet(false), m_shape(new QSGParticleExtruder(this)), m_signal(false)
 {
-    connect(this, SIGNAL(systemChanged(QSGParticleSystem*)),
-            this, SLOT(updateOffsets()));
-    connect(this, SIGNAL(xChanged()),
-            this, SLOT(updateOffsets()));
-    connect(this, SIGNAL(yChanged()),
-            this, SLOT(updateOffsets()));//TODO: in componentComplete and all relevant signals
 }
 
 bool QSGParticleAffector::isAffectConnected()
@@ -152,6 +146,7 @@ void QSGParticleAffector::affectSystem(qreal dt)
             m_groups << m_system->m_groupIds[p];//###Can this occur before group ids are properly assigned?
         m_updateIntSet = false;
     }
+    updateOffsets();//### Needed if an ancestor is transformed.
     foreach (QSGParticleGroupData* gd, m_system->m_groupData){
         foreach (QSGParticleData* d, gd->data){
             if (!d)