From 1d590cd5fdecabbbf6e96be37a2673de347e2224 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 8 Nov 2012 17:09:23 -0800 Subject: CHUI-464, CHUI-466, CHUI-474 : Fixed! Better, unified and more consistent use of refreshConversation() to update torn off dialogs. --- indra/newview/llimconversation.cpp | 25 ++++++++----------------- indra/newview/llimconversation.h | 1 - 2 files changed, 8 insertions(+), 18 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp index e031b0e829..d1fa6e2103 100644 --- a/indra/newview/llimconversation.cpp +++ b/indra/newview/llimconversation.cpp @@ -51,7 +51,6 @@ LLIMConversation::LLIMConversation(const LLSD& session_id) , mTearOffBtn(NULL) , mCloseBtn(NULL) , mSessionID(session_id.asUUID()) -// , mParticipantList(NULL) , mConversationsRoot(NULL) , mChatHistory(NULL) , mInputEditor(NULL) @@ -77,14 +76,6 @@ LLIMConversation::LLIMConversation(const LLSD& session_id) LLIMConversation::~LLIMConversation() { - /* - if (mParticipantList) - { - delete mParticipantList; - mParticipantList = NULL; - } - */ - delete mRefreshTimer; } @@ -246,8 +237,6 @@ BOOL LLIMConversation::postBuild() buildConversationViewParticipant(); - updateHeaderAndToolbar(); - mSaveRect = isTornOff(); initRectControl(); @@ -264,6 +253,8 @@ BOOL LLIMConversation::postBuild() result = LLDockableFloater::postBuild(); } + refreshConversation(); + return result; } @@ -274,8 +265,6 @@ LLParticipantList* LLIMConversation::getParticipantList() void LLIMConversation::draw() { - LLTransientDockableFloater::draw(); - if (mRefreshTimer->hasExpired()) { if (getParticipantList()) @@ -283,12 +272,13 @@ void LLIMConversation::draw() getParticipantList()->update(); } - refresh(); - updateHeaderAndToolbar(); + refreshConversation(); // Restart the refresh timer mRefreshTimer->setTimerExpirySec(REFRESH_INTERVAL); } + + LLTransientDockableFloater::draw(); } void LLIMConversation::enableDisableCallBtn() @@ -488,6 +478,8 @@ void LLIMConversation::refreshConversation() mConversationViewModel.requestSortAll(); mConversationsRoot->arrangeAll(); mConversationsRoot->update(); + updateHeaderAndToolbar(); + refresh(); } // Copied from LLIMFloaterContainer::createConversationViewParticipant(). Refactor opportunity! @@ -731,7 +723,6 @@ void LLIMConversation::onTearOffClicked() mSaveRect = isTornOff(); initRectControl(); LLFloater::onClickTearOff(this); - updateHeaderAndToolbar(); refreshConversation(); } @@ -749,7 +740,7 @@ bool LLIMConversation::checkIfTornOff() if (isTorn != isTornOff()) { setTornOff(isTorn); - updateHeaderAndToolbar(); + refreshConversation(); } return isTorn; diff --git a/indra/newview/llimconversation.h b/indra/newview/llimconversation.h index 49cfcb68c4..93a1ab847e 100644 --- a/indra/newview/llimconversation.h +++ b/indra/newview/llimconversation.h @@ -142,7 +142,6 @@ protected: LLUUID mSessionID; LLLayoutPanel* mParticipantListPanel; // add the widgets to that see mConversationsListPanel - //LLParticipantList* mParticipantList; get this from the mConversationsItems for the moment LLParticipantList* getParticipantList(); conversations_widgets_map mConversationsWidgets; LLConversationViewModel mConversationViewModel; -- cgit v1.2.3