summaryrefslogtreecommitdiff
path: root/indra/newview/lltoastnotifypanel.cpp
diff options
context:
space:
mode:
authorAlexei Arabadji <aarabadji@productengine.com>2010-03-25 17:09:20 +0200
committerAlexei Arabadji <aarabadji@productengine.com>2010-03-25 17:09:20 +0200
commit920d54297fc13a7a975ff4372f0c1559cf9cf199 (patch)
treefd557a25ed48a07624fb93745c3582622fc948e5 /indra/newview/lltoastnotifypanel.cpp
parent0f32c14cab77717dab75b8d91302104e8f168ceb (diff)
fixed major EXT-6500 “Message Well counter changes to '-1' after
plain text chat was enabled while unresolved offer was in hided IM window”, Added check to LLToastNotifyPanel destructor whether we should close notification since notification will be reused by IM floater when reload messages, the rule is: if LLToastNotifyPanel destroying but IM floater is exists – we shouldn't close notification. The problem is that notification was incorrectly deleted when IM floater reloads messages on chat log fromat change event. reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/80/ --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/lltoastnotifypanel.cpp')
-rw-r--r--indra/newview/lltoastnotifypanel.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index 907740a88e..c9d2d404c0 100644
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -45,6 +45,7 @@
#include "lltrans.h"
#include "llnotificationsutil.h"
#include "llviewermessage.h"
+#include "llimfloater.h"
const S32 BOTTOM_PAD = VPAD * 3;
const S32 IGNORE_BTN_TOP_DELTA = 3*VPAD;//additional ignore_btn padding
@@ -531,12 +532,26 @@ void LLToastNotifyPanel::disableRespondedOptions(LLNotificationPtr& notification
//////////////////////////////////////////////////////////////////////////
-LLIMToastNotifyPanel::LLIMToastNotifyPanel(LLNotificationPtr& pNotification, const LLRect& rect /* = LLRect::null */)
- : LLToastNotifyPanel(pNotification, rect)
+LLIMToastNotifyPanel::LLIMToastNotifyPanel(LLNotificationPtr& pNotification, const LLUUID& session_id, const LLRect& rect /* = LLRect::null */)
+ : mSessionID(session_id), LLToastNotifyPanel(pNotification, rect)
{
mTextBox->setFollowsAll();
}
+LLIMToastNotifyPanel::~LLIMToastNotifyPanel()
+{
+ // We shouldn't delete notification when IM floater exists
+ // since that notification will be reused by IM floater.
+ // This may happened when IM floater reloads messages, exactly when user
+ // changes layout of IM chat log(disable/enable plaintext mode).
+ // See EXT-6500
+ LLIMFloater* im_floater = LLIMFloater::findInstance(mSessionID);
+ if (im_floater != NULL && !im_floater->isDead())
+ {
+ mCloseNotificationOnDestroy = false;
+ }
+}
+
void LLIMToastNotifyPanel::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */)
{
S32 text_height = mTextBox->getTextBoundingRect().getHeight();