summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelface.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2018-12-14 00:46:11 +0200
committerAndreyL ProductEngine <alihatskiy@productengine.com>2018-12-14 00:46:11 +0200
commit74a56f30aa0ef4daef41ef5fdac98610b2b109df (patch)
treef526ea45ddc0e0724c2c34ecc59b70cd7ea3c2a2 /indra/newview/llpanelface.cpp
parent4ab4c4498a04576a3cddf3533359a15a636b53b6 (diff)
parenta3b3ad727f53aa280ffbcc1b61ccfbb48e988708 (diff)
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llpanelface.cpp')
-rw-r--r--indra/newview/llpanelface.cpp13
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)