diff options
author | Merov Linden <merov@lindenlab.com> | 2012-10-25 18:16:56 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-10-25 18:16:56 -0700 |
commit | d49de3a66a5476f4541f15dc61c68e0e509c4c70 (patch) | |
tree | 7b1245ccbc660130e7973999af04acbb1d19349c /indra/newview/llimfloatercontainer.cpp | |
parent | b5d76c2b55666083279580f383e5a7b139517504 (diff) |
CHUI-441 : WIP : Fix crashes when spawning torn off floaters, added widgets creation in the torn off floater for participants.
Diffstat (limited to 'indra/newview/llimfloatercontainer.cpp')
-rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 11d8b29884..0d62630b31 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -98,9 +98,7 @@ LLIMFloaterContainer::~LLIMFloaterContainer() void LLIMFloaterContainer::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) { - llinfos << "Merov debug : sessionAdded, adding conversation item, id = " << session_id << llendl; addConversationListItem(session_id, true); - llinfos << "Merov debug : sessionAdded, adding LLIMFloater, id = " << session_id << llendl; LLIMFloater::addToHost(session_id, true); } @@ -111,9 +109,7 @@ void LLIMFloaterContainer::sessionActivated(const LLUUID& session_id, const std: void LLIMFloaterContainer::sessionVoiceOrIMStarted(const LLUUID& session_id) { - llinfos << "Merov debug : sessionVoiceOrIMStarted, adding conversation item, id = " << session_id << llendl; addConversationListItem(session_id, true); - llinfos << "Merov debug : sessionVoiceOrIMStarted, adding LLIMFloater, id = " << session_id << llendl; LLIMFloater::addToHost(session_id, true); } @@ -433,6 +429,7 @@ bool LLIMFloaterContainer::onConversationModelEvent(const LLSD& event) return false; } LLConversationViewParticipant* participant_view = session_view->findParticipant(participant_id); + LLIMFloater *conversation_floater = LLIMFloater::findInstance(session_id); if (type == "remove_participant") { @@ -446,20 +443,18 @@ bool LLIMFloaterContainer::onConversationModelEvent(const LLSD& event) } else if (type == "add_participant") { - if (!participant_view) + LLConversationItemSession* session_model = dynamic_cast<LLConversationItemSession*>(get_ptr_in_map(mConversationsItems,session_id)); + LLConversationItemParticipant* participant_model = (session_model ? session_model->findParticipant(participant_id) : NULL); + if (!participant_view && session_model && participant_model) { - LLConversationItemSession* session_model = dynamic_cast<LLConversationItemSession*>(get_ptr_in_map(mConversationsItems,session_id)); - if (session_model) - { - LLConversationItemParticipant* participant_model = session_model->findParticipant(participant_id); - if (participant_model) - { - participant_view = createConversationViewParticipant(participant_model); - participant_view->addToFolder(session_view); - participant_view->setVisible(TRUE); - } - } - + participant_view = createConversationViewParticipant(participant_model); + participant_view->addToFolder(session_view); + participant_view->setVisible(TRUE); + } + // CHUI-441 : + if (conversation_floater && participant_model) + { + conversation_floater->addConversationViewParticipant(participant_model); } } else if (type == "update_participant") |