From 99769066f53b0552ca0b303618ebe9aba8825b62 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Wed, 16 Sep 2009 00:36:45 -0700 Subject: Don't track avatars when focus lost --- linden/indra/newview/llfloatermap.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llfloatermap.cpp b/linden/indra/newview/llfloatermap.cpp index 748bb7e..1ec2020 100644 --- a/linden/indra/newview/llfloatermap.cpp +++ b/linden/indra/newview/llfloatermap.cpp @@ -277,7 +277,10 @@ void LLFloaterMap::populateRadar() mRadarList->sortItems(); mRadarList->setScrollPos(scroll_pos); - mRadarList->selectByID(mSelectedAvatar); + if (mSelectedAvatar.notNull()) + { + mRadarList->selectByID(mSelectedAvatar); + } // set count std::stringstream avatar_count; @@ -300,8 +303,18 @@ void LLFloaterMap::populateRadar() void LLFloaterMap::toggleButtons() { - BOOL enabled = mSelectedAvatar.notNull() ? visibleItemsSelected() : FALSE; - BOOL unmute_enabled = mSelectedAvatar.notNull() ? LLMuteList::getInstance()->isMuted(mSelectedAvatar) : FALSE; + BOOL enabled = FALSE; + BOOL unmute_enabled = FALSE; + LLPanel* panelp = getChild("RadarPanel"); + if (panelp->hasFocus()) + { + enabled = mSelectedAvatar.notNull() ? visibleItemsSelected() : FALSE; + unmute_enabled = mSelectedAvatar.notNull() ? LLMuteList::getInstance()->isMuted(mSelectedAvatar) : FALSE; + } + else + { + mRadarList->deselect(); + } childSetEnabled("im_btn", enabled); childSetEnabled("profile_btn", enabled); -- cgit v1.1