summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelface.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2018-12-15 15:24:16 +0200
committerAndreyL ProductEngine <alihatskiy@productengine.com>2018-12-15 15:24:16 +0200
commit82aefc8fa6ecf707d31d4370ed65aa409ea6b761 (patch)
tree3ca5ad52538872abf950d756b2364af8154c3db4 /indra/newview/llpanelface.cpp
parent88605685b0b81a165e877d9cf1bcad52676104a3 (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 13ee7bb003..8d7865c8ba 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 );
@@ -1318,8 +1319,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)