From d7d0416547958792517a9b739b370e51c717fb23 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Fri, 12 Oct 2012 20:15:57 -0700 Subject: CHUI-380: (In progress) Refactoring needed to fix focusing issues when selecting an existing conversation item. This commit resolves re-introducing bug CHUI-289. Will code review and cleanup code in next commit. --- indra/newview/llimfloatercontainer.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'indra/newview/llimfloatercontainer.cpp') diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 5f111b39d4..0250854f36 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -101,6 +101,11 @@ void LLIMFloaterContainer::sessionAdded(const LLUUID& session_id, const std::str addConversationListItem(session_id); } +void LLIMFloaterContainer::sessionAlreadyAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) +{ + doSomething(session_id); +} + void LLIMFloaterContainer::sessionVoiceOrIMStarted(const LLUUID& session_id) { LLIMFloater::addToHost(session_id, true); @@ -1069,6 +1074,19 @@ void LLIMFloaterContainer::setConvItemSelect(const LLUUID& session_id) } } +void LLIMFloaterContainer::doSomething(const LLUUID& session_id) +{ + LLConversationItem* vmi = static_cast(mConversationsRoot->getCurSelectedItem()->getParentFolder()->getViewModelItem()); + + if(session_id != vmi->getUUID()) + { + mSelectedSession = session_id; + LLFolderViewItem* widget = mConversationsWidgets[session_id]; + (widget->getRoot())->setSelection(widget, FALSE, FALSE); + } +} + + void LLIMFloaterContainer::setTimeNow(const LLUUID& session_id, const LLUUID& participant_id) { conversations_items_map::iterator item_it = mConversationsItems.find(session_id); @@ -1204,6 +1222,7 @@ void LLIMFloaterContainer::removeConversationListItem(const LLUUID& uuid, bool c conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin(); if (widget_it != mConversationsWidgets.end()) { + mSelectedSession = widget_it->first; LLFolderViewItem* widget = widget_it->second; widget->selectItem(); } -- cgit v1.2.3