summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelme.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-04-30 13:28:15 -0700
committerJames Cook <james@lindenlab.com>2010-04-30 13:28:15 -0700
commitea7d6eab6f58b994825cf051741a874ec1681515 (patch)
tree20a96ed719794ee2922476aa3f75b22ba86511ea /indra/newview/llpanelme.cpp
parentda723c27ca4cdd402af81a0b6f2545334119b98c (diff)
Hide "Set Name..." button if region/grid doesn't use display names
Diffstat (limited to 'indra/newview/llpanelme.cpp')
-rw-r--r--indra/newview/llpanelme.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp
index c4fe613161..d4a54852cd 100644
--- a/indra/newview/llpanelme.cpp
+++ b/indra/newview/llpanelme.cpp
@@ -196,6 +196,13 @@ void LLPanelMyProfileEdit::onOpen(const LLSD& key)
// Disable editing until data is loaded, or edited fields will be overwritten when data
// is loaded.
enableEditing(false);
+
+ // Only allow changing name if this region/grid supports it
+ bool use_display_names = LLAvatarNameCache::useDisplayNames();
+ LLUICtrl* set_name = getChild<LLUICtrl>("set_name");
+ set_name->setVisible(use_display_names);
+ set_name->setEnabled(use_display_names);
+
LLPanelMyProfile::onOpen(getAvatarId());
}