summaryrefslogtreecommitdiff
path: root/indra/llprimitive/lltextureentry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llprimitive/lltextureentry.cpp')
-rwxr-xr-xindra/llprimitive/lltextureentry.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp
index ca57f1edbd..597f078490 100755
--- a/indra/llprimitive/lltextureentry.cpp
+++ b/indra/llprimitive/lltextureentry.cpp
@@ -539,21 +539,28 @@ S32 LLTextureEntry::setGlow(F32 glow)
S32 LLTextureEntry::setMaterialID(const LLMaterialID& pMaterialID)
{
- if (mMaterialID != pMaterialID)
+ if ( (mMaterialID != pMaterialID) || (mMaterialUpdatePending && !mSelected) )
{
- mMaterialID = pMaterialID;
-
- }
- if (mMaterialID.isNull())
+ if (mSelected)
{
- setMaterialParams(NULL);
+ mMaterialUpdatePending = true;
+ mMaterialID = pMaterialID;
+ return TEM_CHANGE_NONE;
}
+
+ mMaterialUpdatePending = false;
+ mMaterialID = pMaterialID;
return TEM_CHANGE_TEXTURE;
}
+ return TEM_CHANGE_NONE;
+}
S32 LLTextureEntry::setMaterialParams(const LLMaterialPtr pMaterialParams)
{
-
+ if (mSelected)
+ {
+ mMaterialUpdatePending = true;
+ }
mMaterial = pMaterialParams;
return TEM_CHANGE_TEXTURE;
}