diff options
author | Merov Linden <merov@lindenlab.com> | 2012-10-29 16:59:53 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-10-29 16:59:53 -0700 |
commit | 480c3a1acb32e98d0d64aaf7bb70e4d61e6882f6 (patch) | |
tree | 00e362ef88c2ac610c1a338bbfcb9992392fc91a /indra/newview | |
parent | 09282019ef4d068fe95a94931bf341d8e84f29ea (diff) |
CHUI-469 : Fixed. Add the widget to its map, init the widget map consistently and correctly.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llimconversation.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 1 |
2 files changed, 13 insertions, 6 deletions
diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp index ad34acd941..f2421dd78f 100644 --- a/indra/newview/llimconversation.cpp +++ b/indra/newview/llimconversation.cpp @@ -50,6 +50,7 @@ LLIMConversation::LLIMConversation(const LLSD& session_id) , mCloseBtn(NULL) , mSessionID(session_id.asUUID()) // , mParticipantList(NULL) + , mConversationsRoot(NULL) , mChatHistory(NULL) , mInputEditor(NULL) , mInputEditorTopPad(0) @@ -309,6 +310,15 @@ void LLIMConversation::appendMessage(const LLChat& chat, const LLSD &args) void LLIMConversation::buildConversationViewParticipant() { + // Clear the widget list since we are rebuilding afresh from the model + conversations_widgets_map::iterator widget_it = mConversationsWidgets.begin(); + while (widget_it != mConversationsWidgets.end()) + { + removeConversationViewParticipant(widget_it->first); + // Iterators are invalidated by erase so we need to pick begin again + widget_it = mConversationsWidgets.begin(); + } + // Get the model list LLParticipantList* item = getParticipantList(); if (!item) @@ -342,7 +352,7 @@ void LLIMConversation::addConversationViewParticipant(LLConversationItem* partic else { LLConversationViewParticipant* participant_view = createConversationViewParticipant(participant_model); - mConversationsWidgets[uuid] = widget; + mConversationsWidgets[uuid] = participant_view; participant_view->addToFolder(mConversationsRoot); participant_view->setVisible(TRUE); refreshConversation(); @@ -373,10 +383,10 @@ void LLIMConversation::updateConversationViewParticipant(const LLUUID& participa void LLIMConversation::refreshConversation() { - // *TODO: update the conversation name - // *TODO: check that all participant models do have a view (this is a consistency check) + // *TODO: check that all participant models do have a view (debug consistency check) mConversationViewModel.requestSortAll(); mConversationsRoot->arrangeAll(); + mConversationsRoot->update(); } // Copied from LLIMFloaterContainer::createConversationViewParticipant(). Refactor opportunity! @@ -392,8 +402,6 @@ LLConversationViewParticipant* LLIMConversation::createConversationViewParticipa params.tool_tip = params.name; params.participant_id = item->getUUID(); - llinfos << "Merov debug : LLIMConversation, create participant, name = " << item->getDisplayName() << llendl; - return LLUICtrlFactory::create<LLConversationViewParticipant>(params); } diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 89dfd2e149..297db96c83 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -129,7 +129,6 @@ void LLIMFloaterContainer::onCurrentChannelChanged(const LLUUID& session_id) { if (session_id != LLUUID::null) { - llinfos << "Merov debug : onCurrentChannelChanged, LLIMFloater::show, id = " << session_id << llendl; LLIMFloater::show(session_id); } } |