From ea7d6eab6f58b994825cf051741a874ec1681515 Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 30 Apr 2010 13:28:15 -0700 Subject: Hide "Set Name..." button if region/grid doesn't use display names --- indra/newview/llpanelme.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview') 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("set_name"); + set_name->setVisible(use_display_names); + set_name->setEnabled(use_display_names); + LLPanelMyProfile::onOpen(getAvatarId()); } -- cgit v1.2.3