diff options
author | angela <angela@lindenlab.com> | 2009-11-13 15:20:04 +0800 |
---|---|---|
committer | angela <angela@lindenlab.com> | 2009-11-13 15:20:04 +0800 |
commit | a7b8b51a5aabfbe58a904896fb1e7a1c812c2bc6 (patch) | |
tree | f16a6c5c3ffaccab7dedc7c94dcceeed4909a6ee /indra/llui/lluicolortable.cpp | |
parent | 9054f31f89963f2f24a6b872fbc6816ee01f0d70 (diff) | |
parent | 01f1eaf7e0faaa3ecde36ac28a346fed53a571fd (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.cpp | 10 |
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() |