diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-19 12:57:03 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-19 12:57:03 -0800 |
commit | 705e31f16ad2e9b530bc083db13d29cbc8613f82 (patch) | |
tree | bbf7a443c649f4561e7f70a787b83e6555afe0d0 /indra/newview/llnamebox.cpp | |
parent | cd5cd11ccbd1ad13afd43c045735f01dbc994a80 (diff) | |
parent | 85c97cab02b0f2ba89b7af05c14a69ff90ffa25e (diff) |
PE merge.
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, |