summaryrefslogtreecommitdiff
path: root/indra/llui/lluicolortable.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2009-11-16 16:28:04 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2009-11-16 16:28:04 +0200
commiteef22e0baf9e62f8c38058ad22e6e6bd5e5aca26 (patch)
tree2a498eb73a80802c7811193ce63253c9be905295 /indra/llui/lluicolortable.cpp
parent59d575fe615bf14a10056c9b9fe0c109ec2c103e (diff)
parentbd42c1ae2cd6bb6e005478cc121c2b5d7a844eb4 (diff)
Merge from default branch
--HG-- branch : product-engine
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()