diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2018-12-14 00:46:11 +0200 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2018-12-14 00:46:11 +0200 |
commit | 74a56f30aa0ef4daef41ef5fdac98610b2b109df (patch) | |
tree | f526ea45ddc0e0724c2c34ecc59b70cd7ea3c2a2 /indra/newview/llpanelface.cpp | |
parent | 4ab4c4498a04576a3cddf3533359a15a636b53b6 (diff) | |
parent | a3b3ad727f53aa280ffbcc1b61ccfbb48e988708 (diff) |
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llpanelface.cpp')
-rw-r--r-- | indra/newview/llpanelface.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 1fe42c6510..38f181c803 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -731,11 +731,12 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) bool identical_color = false; if(mColorSwatch) - { + { LLSelectedTE::getColor(color, identical_color); + LLColor4 prev_color = mColorSwatch->get(); mColorSwatch->setOriginal(color); - mColorSwatch->set(color, TRUE); + mColorSwatch->set(color, force_set_values || (prev_color != color) || !editable); mColorSwatch->setValid(editable); mColorSwatch->setEnabled( editable ); @@ -1331,8 +1332,12 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) // if (!material->getSpecularID().isNull()) { - getChild<LLColorSwatchCtrl>("shinycolorswatch")->setOriginal(material->getSpecularLightColor()); - getChild<LLColorSwatchCtrl>("shinycolorswatch")->set(material->getSpecularLightColor(),TRUE); + LLColorSwatchCtrl* shiny_swatch = getChild<LLColorSwatchCtrl>("shinycolorswatch"); + LLColor4 new_color = material->getSpecularLightColor(); + LLColor4 old_color = shiny_swatch->get(); + + shiny_swatch->setOriginal(new_color); + shiny_swatch->set(new_color, force_set_values || old_color != new_color || !editable); } // Bumpy (normal) |