diff options
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llpanelface.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 562d293d56..46b3375f64 100755 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -259,8 +259,13 @@ private: // need to get per-face answer to this question for sane alpha mode retention on updates. // bool is_alpha_face = object->isImageAlphaBlended(face); - U8 default_alpha_mode = is_alpha_face ? LLMaterial::DIFFUSE_ALPHA_MODE_BLEND : LLMaterial::DIFFUSE_ALPHA_MODE_NONE; + // need to keep this original answer for valid comparisons in logic below + // + U8 original_default_alpha_mode = is_alpha_face ? LLMaterial::DIFFUSE_ALPHA_MODE_BLEND : LLMaterial::DIFFUSE_ALPHA_MODE_NONE; + + U8 default_alpha_mode = original_default_alpha_mode; + if (!current_material.isNull()) { default_alpha_mode = current_material->getDiffuseAlphaMode(); @@ -285,7 +290,7 @@ private: new_material->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE); } - bool is_default_blend_mode = (new_alpha_mode == default_alpha_mode); + bool is_default_blend_mode = (new_alpha_mode == original_default_alpha_mode); bool is_need_material = !is_default_blend_mode || !new_normal_map_id.isNull() || !new_spec_map_id.isNull(); if (!is_need_material) |