diff options
author | Ychebotarev ProductEngine <ychebotarev@productengine.com> | 2010-01-20 17:12:30 +0200 |
---|---|---|
committer | Ychebotarev ProductEngine <ychebotarev@productengine.com> | 2010-01-20 17:12:30 +0200 |
commit | f4b8822aca5aeebaed56b4bfa3b762b3aa7d0640 (patch) | |
tree | 698944df6f944aa50ab446be91381f6789f6acb7 /indra/newview/llnamebox.cpp | |
parent | 086135b6849bad2e3a5ddcf9bb9540fdb6fb72dd (diff) | |
parent | f2af69c993190fcac87b91e299321fea9751444d (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llnamebox.cpp')
-rw-r--r-- | indra/newview/llnamebox.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/indra/newview/llnamebox.cpp b/indra/newview/llnamebox.cpp index d434017804..cd810b9793 100644 --- a/indra/newview/llnamebox.cpp +++ b/indra/newview/llnamebox.cpp @@ -53,6 +53,7 @@ LLNameBox::LLNameBox(const Params& p) { mNameID = LLUUID::null; mLink = p.link; + mInitialValue = p.initial_value().asString(); LLNameBox::sInstances.insert(this); setText(LLStringUtil::null); } @@ -67,17 +68,23 @@ void LLNameBox::setNameID(const LLUUID& name_id, BOOL is_group) mNameID = name_id; std::string name; + BOOL got_name = FALSE; if (!is_group) { - gCacheName->getFullName(name_id, name); + got_name = gCacheName->getFullName(name_id, name); } else { - gCacheName->getGroupName(name_id, name); + got_name = gCacheName->getGroupName(name_id, name); } - setName(name, is_group); + // Got the name already? Set it. + // Otherwise it will be set later in refresh(). + if (got_name) + setName(name, is_group); + else + setText(mInitialValue); } void LLNameBox::refresh(const LLUUID& id, const std::string& firstname, |