aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/particles/qsgparticleaffector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/particles/qsgparticleaffector.cpp')
-rw-r--r--src/declarative/particles/qsgparticleaffector.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/particles/qsgparticleaffector.cpp b/src/declarative/particles/qsgparticleaffector.cpp
index d4b588a44f..96c5cfb25b 100644
--- a/src/declarative/particles/qsgparticleaffector.cpp
+++ b/src/declarative/particles/qsgparticleaffector.cpp
@@ -56,6 +56,8 @@ QSGParticleAffector::QSGParticleAffector(QSGItem *parent) :
void QSGParticleAffector::componentComplete()
{
+ if(!m_system && qobject_cast<QSGParticleSystem*>(parentItem()))
+ setSystem(qobject_cast<QSGParticleSystem*>(parentItem()));
if(!m_system)
qWarning() << "Affector created without a particle system specified";//TODO: useful QML warnings, like line number?
QSGItem::componentComplete();