diff options
Diffstat (limited to 'indra/llprimitive/lltextureentry.cpp')
-rwxr-xr-x[-rw-r--r--] | indra/llprimitive/lltextureentry.cpp | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index 6e5d27bb94..8365c9d7b6 100644..100755 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -91,7 +91,7 @@ LLTextureEntry::LLTextureEntry(const LLTextureEntry &rhs) mMediaFlags = rhs.mMediaFlags; mGlow = rhs.mGlow; mMaterialID = rhs.mMaterialID; - + mMaterial = rhs.mMaterial; if (rhs.mMediaEntry != NULL) { // Make a copy mMediaEntry = new LLMediaEntry(*rhs.mMediaEntry); @@ -113,6 +113,7 @@ LLTextureEntry &LLTextureEntry::operator=(const LLTextureEntry &rhs) mMediaFlags = rhs.mMediaFlags; mGlow = rhs.mGlow; mMaterialID = rhs.mMaterialID; + mMaterial = rhs.mMaterial; if (mMediaEntry != NULL) { delete mMediaEntry; } @@ -549,27 +550,22 @@ S32 LLTextureEntry::setMaterialID(const LLMaterialID& pMaterialID) mMaterialUpdatePending = false; mMaterialID = pMaterialID; - if (mMaterialID.isNull()) - { - setMaterialParams(NULL); - } - return TEM_CHANGE_TEXTURE; } - return TEM_CHANGE_NONE; + if (mMaterialID.isNull()) + { + setMaterialParams(NULL); + } + return TEM_CHANGE_TEXTURE; } S32 LLTextureEntry::setMaterialParams(const LLMaterialPtr pMaterialParams) { - if (mMaterial != pMaterialParams) + if (mSelected) { - if (mSelected) - { - mMaterialUpdatePending = true; - } - mMaterial = pMaterialParams; - return TEM_CHANGE_TEXTURE; + mMaterialUpdatePending = true; } - return TEM_CHANGE_NONE; + mMaterial = pMaterialParams; + return TEM_CHANGE_TEXTURE; } void LLTextureEntry::setMediaData(const LLMediaEntry &media_entry) |