From 1e9b79e2c1304e71f9df8c74e16bde3fe523d203 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Wed, 9 Jul 2014 03:08:13 -0400 Subject: [PATCH] Fix old namesystem code that broke initially setting Legacy (w/display) for everything in general. Also cleans up old logic and directs the friends list to update when the user changes the namesystem for it specifically. Thanks to um... I think it was Deltek, who discovered this bug. --- indra/newview/llpanelgeneral.cpp | 15 ++------------- indra/newview/llviewercontrol.cpp | 4 ++++ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/indra/newview/llpanelgeneral.cpp b/indra/newview/llpanelgeneral.cpp index cf339762a..d794e43da 100644 --- a/indra/newview/llpanelgeneral.cpp +++ b/indra/newview/llpanelgeneral.cpp @@ -142,19 +142,8 @@ void LLPanelGeneral::apply() LLComboBox* fade_out_combobox = getChild("fade_out_combobox"); gSavedSettings.setS32("RenderName", fade_out_combobox->getCurrentIndex()); - S32 namesystem_combobox_index = getChild("namesystem_combobox")->getCurrentIndex(); - BOOL show_resident = getChild("show_resident_checkbox")->getValue(); - if(gSavedSettings.getS32("PhoenixNameSystem")!=namesystem_combobox_index || gSavedSettings.getBOOL("LiruShowLastNameResident")!=show_resident){ - gSavedSettings.setS32("PhoenixNameSystem", namesystem_combobox_index); - gSavedSettings.setBOOL("LiruShowLastNameResident", show_resident); - if(gAgent.getRegion()){ - if(namesystem_combobox_index<=0 || namesystem_combobox_index>2) LLAvatarNameCache::setUseDisplayNames(false); - else LLAvatarNameCache::setUseDisplayNames(true); - LLVOAvatar::invalidateNameTags(); // Remove all clienttags to get them updated - - LLAvatarTracker::instance().updateFriends(); - } - } + gSavedSettings.setS32("PhoenixNameSystem", getChild("namesystem_combobox")->getCurrentIndex()); + gSavedSettings.setBOOL("LiruShowLastNameResident", getChild("show_resident_checkbox")->getValue()); gSavedSettings.setString("LoginLocation", childGetValue("default_start_location").asString()); gSavedSettings.setBOOL("ShowStartLocation", childGetValue("show_location_checkbox")); diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 7e07a2b80..ef609c4a9 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -629,6 +629,8 @@ static bool handlePhoenixNameSystemChanged(const LLSD& newvalue) } // [/Ansariel: Display name support] +bool handleUpdateFriends() { LLAvatarTracker::instance().updateFriends(); return true; } + static bool handleAllowLargeSounds(const LLSD& newvalue) { if(gAudiop) @@ -826,6 +828,8 @@ void settings_setup_listeners() // [Ansariel: Display name support] gSavedSettings.getControl("PhoenixNameSystem")->getSignal()->connect(boost::bind(&handlePhoenixNameSystemChanged, _2)); // [/Ansariel: Display name support] + gSavedSettings.getControl("LiruShowLastNameResident")->getSignal()->connect(boost::bind(handlePhoenixNameSystemChanged, _2)); + gSavedSettings.getControl("FriendNameSystem")->getSignal()->connect(boost::bind(handleUpdateFriends)); gSavedSettings.getControl("AllowLargeSounds")->getSignal()->connect(boost::bind(&handleAllowLargeSounds, _2)); gSavedSettings.getControl("LiruUseZQSDKeys")->getSignal()->connect(boost::bind(load_default_bindings, _2));