Order of operations fix
authorAlan Alpert <alan.alpert@nokia.com>
Fri, 9 Sep 2011 04:44:04 +0000 (14:44 +1000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 12 Sep 2011 23:43:39 +0000 (01:43 +0200)
Recycling needs to be done always, and currently here is the only time
it's supposed to happen each tick.

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

src/declarative/particles/qsgparticlesystem.cpp

index 425df34..085e6af 100644 (file)
@@ -1009,7 +1009,7 @@ void QSGParticleSystem::updateCurrentTime( int currentTime )
     bool oldClear = m_empty;
     m_empty = true;
     foreach (QSGParticleGroupData* gd, m_groupData)//Recycle all groups and see if they're out of live particles
-        m_empty = m_empty && gd->recycle();
+        m_empty = gd->recycle() && m_empty;
 
     if (m_spriteEngine)
         m_spriteEngine->updateSprites(m_timeInt);