diff options
author | Graham Linden <graham@lindenlab.com> | 2013-11-11 15:50:01 -0800 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2013-11-11 15:50:01 -0800 |
commit | 10705b43600d31b31d903ed1d4e3aba0bd4e2963 (patch) | |
tree | df43426032ec82dc34f9019a063a4cdfa00be1da /indra/newview/llfloaterconversationpreview.cpp | |
parent | 66b6bffca92261d418f9888be4c3542554ddb4af (diff) | |
parent | ebc9bcbf69f7a519677a6522979a6bf6cbb04bb8 (diff) |
Merge 3.6.11 for RC-ability
Diffstat (limited to 'indra/newview/llfloaterconversationpreview.cpp')
-rwxr-xr-x | indra/newview/llfloaterconversationpreview.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/indra/newview/llfloaterconversationpreview.cpp b/indra/newview/llfloaterconversationpreview.cpp index 4a85160f95..a303c2c6b3 100755 --- a/indra/newview/llfloaterconversationpreview.cpp +++ b/indra/newview/llfloaterconversationpreview.cpp @@ -44,7 +44,8 @@ LLFloaterConversationPreview::LLFloaterConversationPreview(const LLSD& session_i mPageSize(gSavedSettings.getS32("ConversationHistoryPageSize")), mAccountName(session_id[LL_FCP_ACCOUNT_NAME]), mCompleteName(session_id[LL_FCP_COMPLETE_NAME]), - mMutex(NULL) + mMutex(NULL), + mShowHistory(false) { } @@ -91,7 +92,6 @@ BOOL LLFloaterConversationPreview::postBuild() mPageSpinner->setMinValue(1); mPageSpinner->set(1); mPageSpinner->setEnabled(false); - mChatHistoryLoaded = false; LLLogChat::startChatHistoryThread(file, load_params); return LLFloater::postBuild(); } @@ -111,33 +111,29 @@ void LLFloaterConversationPreview::setPages(std::list<LLSD>& messages,const std: std::string total_page_num = llformat("/ %d", mCurrentPage+1); getChild<LLTextBox>("page_num_label")->setValue(total_page_num); - mChatHistoryLoaded = true; + mShowHistory = true; } } void LLFloaterConversationPreview::draw() { - if(mChatHistoryLoaded) + if(mShowHistory) { showHistory(); - mChatHistoryLoaded = false; + mShowHistory = false; } LLFloater::draw(); } void LLFloaterConversationPreview::onOpen(const LLSD& key) { - if(mChatHistoryLoaded) - { - showHistory(); - } + mShowHistory = true; } void LLFloaterConversationPreview::showHistory() { - // additional protection to avoid changes of mMessages in setPages() + // additional protection to avoid changes of mMessages in setPages LLMutexLock lock(&mMutex); - if (!mMessages.size() || mCurrentPage * mPageSize >= mMessages.size()) { return; @@ -198,10 +194,11 @@ void LLFloaterConversationPreview::showHistory() void LLFloaterConversationPreview::onMoreHistoryBtnClick() { mCurrentPage = (int)(mPageSpinner->getValueF32()); - if (--mCurrentPage < 0) + if (!mCurrentPage) { return; } - showHistory(); + mCurrentPage--; + mShowHistory = true; } |