summaryrefslogtreecommitdiff
path: root/indra/llprimitive/lltextureentry.cpp
diff options
context:
space:
mode:
authorGraham Madarasz <graham@lindenlab.com>2013-05-15 16:26:05 -0700
committerGraham Madarasz <graham@lindenlab.com>2013-05-15 16:26:05 -0700
commitc46b24fc9abb00528249b5a1482ace8d31d835c2 (patch)
tree2b6b56f1496049bea67df36c693892398322475e /indra/llprimitive/lltextureentry.cpp
parent5dea7c6b8f6bc0d7306c52b8c9d642f2a7f5dfc5 (diff)
parent387732090b7464763f6b5788a50545db243ac4be (diff)
Merge
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;
}