From 8c64fbf1b76e46fa3f5a8f8c6baba30d4583b7ec Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 6 Nov 2012 18:32:45 -0800 Subject: CHUI-468 : WIP : More cleanup and fix of the participants sorting in LLIMConversation --- indra/newview/llimconversation.cpp | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'indra/newview/llimconversation.cpp') diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp index f91c25ef8c..fb247b4604 100644 --- a/indra/newview/llimconversation.cpp +++ b/indra/newview/llimconversation.cpp @@ -166,7 +166,8 @@ void LLIMConversation::addToHost(const LLUUID& session_id) conversp->setHost(floater_container); conversp->setHost(NULL); } - + // Added floaters share some state (like sort order) with their host + conversp->setSortOrder(floater_container->getSortOrder()); } } } @@ -483,22 +484,11 @@ LLConversationViewParticipant* LLIMConversation::createConversationViewParticipa return LLUICtrlFactory::create(params); } -void LLIMConversation::onSortMenuItemClicked(const LLSD& userdata) +void LLIMConversation::setSortOrder(const LLConversationSort& order) { - // *TODO: Check this code when sort order menu will be added. (EM) - /* - if (!getParticipantList()) - { - return; - } - - std::string chosen_item = userdata.asString(); - - if (chosen_item == "sort_name") - { - getParticipantList()->setSortOrder(LLParticipantList::E_SORT_BY_NAME); - } - */ + mConversationViewModel.setSorter(order); + mConversationsRoot->arrangeAll(); + refreshConversation(); } void LLIMConversation::onIMSessionMenuItemClicked(const LLSD& userdata) -- cgit v1.2.3