summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelface.cpp
diff options
context:
space:
mode:
authorAnchor <none@none>2019-01-29 21:38:05 -0800
committerAnchor <none@none>2019-01-29 21:38:05 -0800
commit56bf3287b8477a7671981d4373659661207333c6 (patch)
treede9c0c4e590fbf96bea7727f17512df9b88ffb40 /indra/newview/llpanelface.cpp
parent597106fa34bca95c2d01c0bf28c6b2bdc031fe35 (diff)
parenta3b3ad727f53aa280ffbcc1b61ccfbb48e988708 (diff)
Merge
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 317226bc3f..a884218c39 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -718,11 +718,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 );
@@ -1352,8 +1353,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)