diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-10-24 16:02:58 -0700 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-10-24 16:02:58 -0700 |
commit | b77e2f17aa9755120032ee977d34e9e923cba0be (patch) | |
tree | 04281925b2f0ef6e924f69d0d425ba6b40bad4e0 /indra/newview/llconversationview.cpp | |
parent | a9f8b945519eece7943694f7ac8c200828e5adfa (diff) |
CHUI-449: Problem: When a toast was clicked, the conversation floater was displayed without selecting the conversation line item. Resolution: Added a function that will show the conversation floater container and then trigger selecting the conversation line item. When the conversation line item is selecting this implicitly will cause the correct conversation floater to be displayed.
Diffstat (limited to 'indra/newview/llconversationview.cpp')
-rwxr-xr-x | indra/newview/llconversationview.cpp | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 9144f402b4..92493194b8 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -437,29 +437,22 @@ void LLConversationViewParticipant::selectItem() LLIMFloaterContainer* container = LLIMFloaterContainer::getInstance(); LLFloater* session_floater; - //Only execute when switching floaters (conversations) - if(vmi && vmi->getUUID() != container->getSelectedSession()) + if(vmi) { - //When null, show the nearby chat conversation floater - if(vmi->getUUID().isNull()) + session_floater = LLIMConversation::getConversation(vmi->getUUID()); + + //Only execute when switching floaters (conversations) + if(vmi->getUUID() != container->getSelectedSession()) { - LLNearbyChat* nearbyChat = LLFloaterReg::findTypedInstance<LLNearbyChat>("nearby_chat"); - nearbyChat->show(); + container->selectFloater(session_floater); + // Store the active session + container->setSelectedSession(vmi->getUUID()); } - //Otherwise, show the IM conversation floater + //Focus the current conversation floater (it is already visible so just focus it) else { - LLIMFloater::show(vmi->getUUID()); + session_floater->setFocus(TRUE); } - - // Store the active session - container->setSelectedSession(vmi->getUUID()); - } - //Focus the current conversation floater (it is already visible so just focus it) - else - { - session_floater = LLIMConversation::getConversation(vmi->getUUID()); - session_floater->setFocus(TRUE); } LLFolderViewItem::selectItem(); |