summaryrefslogtreecommitdiff
path: root/indra/llui/lluicolortable.cpp
diff options
context:
space:
mode:
authorangela <angela@lindenlab.com>2009-11-13 08:43:56 +0800
committerangela <angela@lindenlab.com>2009-11-13 08:43:56 +0800
commit0d4ccb9d1c0761864c8b0c19f0bdd1700b425837 (patch)
tree717db44548966f400b3d2cfb84817b01761f70b7 /indra/llui/lluicolortable.cpp
parentfd9257a5f2649d7afbf65067c0fa4653fc81272c (diff)
parentb4a3b65a602ad56baf761a8426093eda585bc572 (diff)
Automated merge with ssh://angela@hg.lindenlab.com/viewer/viewer-2-0/
Diffstat (limited to 'indra/llui/lluicolortable.cpp')
-rw-r--r--indra/llui/lluicolortable.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/llui/lluicolortable.cpp b/indra/llui/lluicolortable.cpp
index f1e3000547..9be33483d0 100644
--- a/indra/llui/lluicolortable.cpp
+++ b/indra/llui/lluicolortable.cpp
@@ -192,19 +192,27 @@ void LLUIColorTable::clear()
LLUIColor LLUIColorTable::getColor(const std::string& name, const LLColor4& default_color) const
{
string_color_map_t::const_iterator iter = mUserSetColors.find(name);
+
if(iter != mUserSetColors.end())
{
return LLUIColor(&iter->second);
}
iter = mLoadedColors.find(name);
- return (iter != mLoadedColors.end() ? LLUIColor(&iter->second) : LLUIColor(default_color));
+
+ if(iter != mLoadedColors.end())
+ {
+ return LLUIColor(&iter->second);
+ }
+
+ return LLUIColor(default_color);
}
// update user color, loaded colors are parsed on initialization
void LLUIColorTable::setColor(const std::string& name, const LLColor4& color)
{
setColor(name, color, mUserSetColors);
+ setColor(name, color, mLoadedColors);
}
bool LLUIColorTable::loadFromSettings()