diff options
author | Merov Linden <merov@lindenlab.com> | 2012-06-19 16:41:08 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-06-19 16:41:08 -0700 |
commit | 49596f4b7fca83dbd7e49ee0780ac6f5574a5746 (patch) | |
tree | 55adb6b09379512b808d81e7d429120933972a9e /indra | |
parent | c0842339e72b15331a5bbb6bd41324c28916d678 (diff) |
CHUI-148 : Fix reattaching on a hidden message panel; also prevents recreation of list items (eventually lead to crashes).
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 10188febab..fb5697e2f2 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -123,7 +123,11 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp, openFloater(floaterp->getKey()); return; } + + // Make sure the message panel is open when adding a floater or it stays mysteriously hidden + collapseMessagesPane(false); + // Add the floater LLMultiFloater::addFloater(floaterp, select_added_floater, insertion_point); LLUUID session_id = floaterp->getKey(); @@ -355,6 +359,14 @@ void LLIMFloaterContainer::onAvatarPicked(const uuid_vec_t& ids) // CHUI-137 : Temporary implementation of conversations list void LLIMFloaterContainer::addConversationListItem(std::string name, const LLUUID& uuid, LLFloater* floaterp, LLIMFloaterContainer* containerp) { + // Check if the item is not already in the list, exit if it is (nothing to do) + // Note: this happens often, when reattaching a torn off conversation for instance + conversations_items_map::iterator item_it = mConversationsItems.find(uuid); + if (item_it != mConversationsItems.end()) + { + return; + } + // Create a conversation item LLConversationItem* item = new LLConversationItem(name, uuid, floaterp, containerp); mConversationsItems[uuid] = item; |