diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-06-09 15:17:52 +1000 |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2011-06-09 15:17:52 +1000 |
commit | 283a37447b8c400957c4da7dda35a84ea86ac4ad (patch) | |
tree | efd00da37181fb65b4a7dc89b55d3730e76a781b /src/declarative/particles/qsgparticleemitter.cpp | |
parent | e726fa507dd93224bbb8c36ff53f90f61be76061 (diff) |
Automatically set system if parent is a ParticleSystem
Diffstat (limited to 'src/declarative/particles/qsgparticleemitter.cpp')
-rw-r--r-- | src/declarative/particles/qsgparticleemitter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/particles/qsgparticleemitter.cpp b/src/declarative/particles/qsgparticleemitter.cpp index c04c86cfe5..20f3c6bb4b 100644 --- a/src/declarative/particles/qsgparticleemitter.cpp +++ b/src/declarative/particles/qsgparticleemitter.cpp @@ -76,6 +76,8 @@ QSGParticleEmitter::~QSGParticleEmitter() void QSGParticleEmitter::componentComplete() { + if(!m_system && qobject_cast<QSGParticleSystem*>(parentItem())) + setSystem(qobject_cast<QSGParticleSystem*>(parentItem())); if(!m_system) qWarning() << "Emitter created without a particle system specified";//TODO: useful QML warnings, like line number? QSGItem::componentComplete(); |