summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2011-12-12 08:59:42 +0000
committerDanny Pope <daniel.pope@nokia.com>2012-02-01 02:41:34 +0100
commit8e42a138b77f8404c5ca619bf2a1c731683a043c (patch)
tree9458545ae1cb561652f439625798bd65e5c057b2
parente8f290af62ad06212775d0aeb3940d8a1dcf22c5 (diff)
Ensure that texture changes are propagated to the Item3D
Task-number: QTBUG-23095 Change-Id: I66c2f2fec0059f973c9125d6302bb98c952c45d3 Reviewed-by: Danny Pope <daniel.pope@nokia.com>
-rw-r--r--src/quick3d/qdeclarativeeffect.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/quick3d/qdeclarativeeffect.cpp b/src/quick3d/qdeclarativeeffect.cpp
index 573fe4720..77992958c 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()));
}
}