diff options
author | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2011-12-12 08:59:42 +0000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-13 02:49:06 +0100 |
commit | 24aed6d2a20a092239b6d61d2bbd478b073ecff1 (patch) | |
tree | a5b80b8edf38c6b3aa5fbbfd467e5f642119be10 | |
parent | 5344685a7efca74db02e92b8d7158f2d0a5db58f (diff) |
Ensure that texture changes are propagated to the Item3D
Task-number: QTBUG-23095
Change-Id: I66c2f2fec0059f973c9125d6302bb98c952c45d3
Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
-rw-r--r-- | src/quick3d/qdeclarativeeffect.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quick3d/qdeclarativeeffect.cpp b/src/quick3d/qdeclarativeeffect.cpp index 573fe472..77992958 100644 --- a/src/quick3d/qdeclarativeeffect.cpp +++ b/src/quick3d/qdeclarativeeffect.cpp @@ -341,6 +341,8 @@ QGLMaterial *QDeclarativeEffect::material() const void QDeclarativeEffect::setMaterial(QGLMaterial *value) { d->ensureMaterial(); + if (d->materialIndex != -1) + d->palette->material(d->materialIndex)->disconnect(this); int newIndex = -1; if (value) newIndex = d->palette->addMaterial(value); @@ -349,6 +351,8 @@ void QDeclarativeEffect::setMaterial(QGLMaterial *value) d->materialIndex = newIndex; emit effectChanged(); // TODO: deleting old materials + if (value) + connect(value, SIGNAL(materialChanged()), this, SIGNAL(effectChanged())); } } |