summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-05-26 10:48:56 -0700
committerJames Cook <james@lindenlab.com>2010-05-26 10:48:56 -0700
commitfd26a33ff250c3df6eecf1519a4166c0dc2e716f (patch)
tree5b6fa0cb56aca06076d3df724f273d6dc6cc2bab /indra/newview
parentcbf5396ea7c303413b37c543fa028dcdfaa12612 (diff)
Added Debug > XUI > Flush Names Caches for testing
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewermenu.cpp11
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml6
2 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index bcd3a79a8a..224bfec9eb 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -7601,6 +7601,16 @@ class LLWorldToggleCameraControls : public view_listener_t
}
};
+void handle_flush_name_caches()
+{
+ // Toggle display names on and off to flush
+ bool use_display_names = LLAvatarNameCache::useDisplayNames();
+ LLAvatarNameCache::setUseDisplayNames(!use_display_names);
+ LLAvatarNameCache::setUseDisplayNames(use_display_names);
+
+ if (gCacheName) gCacheName->clear();
+}
+
void show_navbar_context_menu(LLView* ctrl, S32 x, S32 y)
{
static LLMenuGL* show_navbar_context_menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_hide_navbar.xml",
@@ -7849,6 +7859,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdvancedToggleXUINames(), "Advanced.ToggleXUINames");
view_listener_t::addMenu(new LLAdvancedCheckXUINames(), "Advanced.CheckXUINames");
view_listener_t::addMenu(new LLAdvancedSendTestIms(), "Advanced.SendTestIMs");
+ commit.add("Advanced.FlushNameCaches", boost::bind(&handle_flush_name_caches));
// Advanced > Character > Grab Baked Texture
view_listener_t::addMenu(new LLAdvancedGrabBakedTexture(), "Advanced.GrabBakedTexture");
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 16c2581d63..38c3e0229a 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -2576,6 +2576,12 @@
<menu_item_call.on_click
function="Advanced.SendTestIMs" />
</menu_item_call>
+ <menu_item_call
+ label="Flush Names Caches"
+ name="Flush Names Caches">
+ <menu_item_call.on_click
+ function="Advanced.FlushNameCaches" />
+ </menu_item_call>
</menu>
<menu
create_jump_keys="true"