summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/extra/qfxparticles.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/declarative/extra/qfxparticles.cpp b/src/declarative/extra/qfxparticles.cpp
index 3130f06..e1c5bbe 100644
--- a/src/declarative/extra/qfxparticles.cpp
+++ b/src/declarative/extra/qfxparticles.cpp
@@ -473,8 +473,9 @@ void QFxParticlesPrivate::tick(int time)
}
}
}
- while(particles.count() < count && particles.count() < percCount && streamWidth--)
- createParticle(time);
+ while(particles.count() < count &&
+ (!stream || (particles.count() < percCount && streamWidth--)))
+ createParticle(time);
}
lastAdvTime = time;
@@ -704,11 +705,13 @@ void QFxParticles::setCount(int cnt)
{
Q_D(QFxParticles);
if (cnt != d->count) {
- if (!d->count && d->clock.state() != QAbstractAnimation::Running)
- d->clock.start(); // infinity??
+ int oldCount = d->count;
d->count = cnt;
d->addParticleTime = 0;
d->addParticleCount = d->particles.count();
+ if (!oldCount && d->clock.state() != QAbstractAnimation::Running){
+ d->clock.start(); // infinity??
+ }
update();
}
}