diff options
author | Antti Määttä <antti.maatta@qt.io> | 2019-11-14 12:55:44 +0200 |
---|---|---|
committer | Antti Määttä <antti.maatta@qt.io> | 2019-11-20 16:09:07 +0200 |
commit | bcde98fd401af64791de38764246f8f73512db56 (patch) | |
tree | 8fb5b52ad2988fa5b6b671e2853da8fb13d5533d /src | |
parent | c4d0de4f1c2d20a10abfb6f385ba1efa3b0f9a1e (diff) |
Always update Images
Material properties should be updated always, but changes to material
images use Image type so they didn't update when they should have.
Always update image properties too.
Task-number: QT3DS-4002
Change-Id: I8df3649c607f88fc08463c7e101c495612f5a0f5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/engine/Qt3DSRenderRuntimeBindingImplTranslation.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/engine/Qt3DSRenderRuntimeBindingImplTranslation.cpp b/src/engine/Qt3DSRenderRuntimeBindingImplTranslation.cpp index dbb1648..c40dd42 100644 --- a/src/engine/Qt3DSRenderRuntimeBindingImplTranslation.cpp +++ b/src/engine/Qt3DSRenderRuntimeBindingImplTranslation.cpp @@ -1640,9 +1640,10 @@ struct STranslatorCreator { TTranslatorType &theTranslator(static_cast<TTranslatorType &>(inTranslator)); SRuntimePropertyParser theParser(inPresentation, inRenderContext, *theTranslator.m_Element); - bool isMaterial = QString(theTranslator.Element().GetTypeDescription().m_TypeName.c_str()) - .contains(QLatin1String("Material")); - if (theTranslator.Element().GetActive() || isMaterial) { + const QString type(theTranslator.Element().GetTypeDescription().m_TypeName.c_str()); + bool force = type.contains(QLatin1String("Material")) + || type.contains(QLatin1String("Image")); + if (theTranslator.Element().GetActive() || force) { // Don't push properties from inactive elements. // Exceptions to this rule are Materials since materials that reference them need // the values even when the original material is inactive |