summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2023-03-19 17:50:13 +0100
committerGuru <alexandrgproductengine@lindenlab.com>2023-03-19 18:33:48 +0100
commitc23353cfc3f0a8c580c99332e47c288758a023c8 (patch)
tree8f9c72921a0f7b044165eae8be51daf89dc04257
parentf5adfae1ade864d80f630855bc65bf65f5ae7ece (diff)
SL-19417 Improve colors.xml behavior
-rw-r--r--indra/llui/lluicolortable.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/llui/lluicolortable.cpp b/indra/llui/lluicolortable.cpp
index 244f0c6f00..b84bb13edb 100644
--- a/indra/llui/lluicolortable.cpp
+++ b/indra/llui/lluicolortable.cpp
@@ -200,7 +200,6 @@ LLUIColor LLUIColorTable::getColor(const std::string& name, const LLColor4& defa
void LLUIColorTable::setColor(const std::string& name, const LLColor4& color)
{
setColor(name, color, mUserSetColors);
- setColor(name, color, mLoadedColors);
}
bool LLUIColorTable::loadFromSettings()
@@ -229,6 +228,11 @@ void LLUIColorTable::saveUserSettings() const
it != mUserSetColors.end();
++it)
{
+ // Compare user color value with the default value, skip if equal
+ string_color_map_t::const_iterator itd = mLoadedColors.find(it->first);
+ if(itd != mUserSetColors.end() && itd->second == it->second)
+ continue;
+
ColorEntryParams color_entry;
color_entry.name = it->first;
color_entry.color.value = it->second;