diff options
| author | Graham Madarasz <graham@lindenlab.com> | 2013-05-11 19:58:56 -0700 |
|---|---|---|
| committer | Graham Madarasz <graham@lindenlab.com> | 2013-05-11 19:58:56 -0700 |
| commit | f356d7eb9fd730f5f6f5a29fb0706e20876ad3bd (patch) | |
| tree | 59b643b708e20ec3d56eaa3a0639f1346f80af10 /indra/llprimitive/lltextureentry.cpp | |
| parent | a0998157746d0429d5b8e75fea973c433dcfd3c4 (diff) | |
Fix many issues with selection misapplication and rendering not matching applied materials
Diffstat (limited to 'indra/llprimitive/lltextureentry.cpp')
| -rwxr-xr-x | indra/llprimitive/lltextureentry.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp index 53816266eb..1d581da897 100755 --- a/indra/llprimitive/lltextureentry.cpp +++ b/indra/llprimitive/lltextureentry.cpp @@ -67,12 +67,16 @@ LLTextureEntry::LLTextureEntry() LLTextureEntry::LLTextureEntry(const LLUUID& tex_id) : mMediaEntry(NULL) + , mSelected(false) + , mMaterialUpdatePending(false) { init(tex_id,1.f,1.f,0.f,0.f,0.f,DEFAULT_BUMP_CODE); } LLTextureEntry::LLTextureEntry(const LLTextureEntry &rhs) : mMediaEntry(NULL) + , mSelected(false) + , mMaterialUpdatePending(false) { mID = rhs.mID; mScaleS = rhs.mScaleS; @@ -536,23 +540,20 @@ S32 LLTextureEntry::setMaterialID(const LLMaterialID& pMaterialID) if (mMaterialID != pMaterialID) { 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) - { - mMaterial = pMaterialParams; - return TEM_CHANGE_TEXTURE; - } - return TEM_CHANGE_NONE; + + mMaterial = pMaterialParams; + return TEM_CHANGE_TEXTURE; } void LLTextureEntry::setMediaData(const LLMediaEntry &media_entry) |
