aboutsummaryrefslogtreecommitdiffstats
path: root/src/particles/qquickparticleemitter.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2016-03-04 13:36:45 +0100
committerErik Verbruggen <erik.verbruggen@theqtcompany.com>2016-03-08 12:04:48 +0000
commit6c923498cd89e3fb1b4d92f27a9d7c840cee5971 (patch)
tree85f799199807d6785b96a11a218617cea68dfb3c /src/particles/qquickparticleemitter.cpp
parent562fc162014f78146bd407438512501419ac089b (diff)
Particles: half the number of calls to emittersChanged.
When a particle emitter is not yet complete, calling emittersChanged through both groupChanged and systemChanged is unnecessary. Only connect to those signals once after the component is complete, and then call emittersChanged. Also do not call emittersChanged when the particle system component is not complete yet. Change-Id: I67543ce80c9235bd5f72d95352ec96e97a1cf66b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/particles/qquickparticleemitter.cpp')
-rw-r--r--src/particles/qquickparticleemitter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/particles/qquickparticleemitter.cpp b/src/particles/qquickparticleemitter.cpp
index c72cbc01e0..6e116d450c 100644
--- a/src/particles/qquickparticleemitter.cpp
+++ b/src/particles/qquickparticleemitter.cpp
@@ -273,6 +273,8 @@ void QQuickParticleEmitter::componentComplete()
{
if (!m_system && qobject_cast<QQuickParticleSystem*>(parentItem()))
setSystem(qobject_cast<QQuickParticleSystem*>(parentItem()));
+ if (m_system)
+ m_system->finishRegisteringParticleEmitter(this);
QQuickItem::componentComplete();
}