From 0ac752cd4b654f5c87b02db064f3a79c378b8284 Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Tue, 27 Oct 2009 18:48:47 +0200 Subject: fixed major bug (EXT-1849) Crash in Notification subsystem while teleporting and having toasts shown --HG-- branch : product-engine --- indra/newview/lltoast.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'indra/newview/lltoast.cpp') diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index eba43d76a6..b9c73076d2 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -63,6 +63,7 @@ LLToast::LLToast(const LLToast::Params& p) mHideBtnEnabled(p.enable_hide_btn), mHideBtn(NULL), mNotification(p.notification), + mIsHidden(false), mHideBtnPressed(false) { LLUICtrlFactory::getInstance()->buildFloater(this, "panel_toast.xml", NULL); @@ -143,7 +144,8 @@ void LLToast::hide() { setVisible(FALSE); mTimer.stop(); - mOnFadeSignal(this); + mIsHidden = true; + mOnFadeSignal(this); } //-------------------------------------------------------------------------- @@ -159,9 +161,7 @@ void LLToast::tick() { if(mCanFade) { - setVisible(FALSE); - mTimer.stop(); - mOnFadeSignal(this); + hide(); } } @@ -206,6 +206,12 @@ void LLToast::draw() //-------------------------------------------------------------------------- void LLToast::setVisible(BOOL show) { + if(mIsHidden) + { + // this toast is invisible untill its ScreenChannel will allow it + return; + } + if(show) { setBackgroundOpaque(TRUE); -- cgit v1.2.3 From f71f8ecdf909bbeb6573870d3860b0447a64914c Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Wed, 28 Oct 2009 12:08:49 +0200 Subject: additional comments for the major bug (EXT-1849) Crash in Notification subsystem while teleporting and having toasts shown --HG-- branch : product-engine --- indra/newview/lltoast.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/lltoast.cpp') diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index b9c73076d2..24824a095c 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -208,7 +208,11 @@ void LLToast::setVisible(BOOL show) { if(mIsHidden) { - // this toast is invisible untill its ScreenChannel will allow it + // this toast is invisible after fade until its ScreenChannel will allow it + // + // (EXT-1849) according to this bug a toast can be resurrected from + // invisible state if it faded during a teleportation + // then it fades a second time and causes a crash return; } -- cgit v1.2.3 From f4424f8867eec64f770715d1d44ea4276c8129af Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Fri, 30 Oct 2009 13:24:49 +0200 Subject: fixed normal bug (EXT-1971) Add fade time period for nearby chat bubbles --HG-- branch : product-engine --- indra/newview/lltoast.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltoast.cpp') diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 24824a095c..903df21e78 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -49,13 +49,15 @@ LLToast::Params::Params() enable_hide_btn("enable_hide_btn", true), force_show("force_show", false), force_store("force_store", false), + fading_time_secs("fading_time_secs", gSavedSettings.getS32("ToastFadingTime")), lifetime_secs("lifetime_secs", gSavedSettings.getS32("NotificationToastLifeTime")) {}; LLToast::LLToast(const LLToast::Params& p) : LLModalDialog(LLSD(), p.is_modal), mPanel(p.panel), - mToastLifetime(p.lifetime_secs), + mToastLifetime(p.lifetime_secs), + mToastFadingTime(p.fading_time_secs), mNotificationID(p.notif_id), mSessionID(p.session_id), mCanFade(p.can_fade), @@ -127,7 +129,7 @@ bool LLToast::lifetimeHasExpired() if (mTimer.getStarted()) { F32 elapsed_time = mTimer.getElapsedTimeF32(); - if ((mToastLifetime - elapsed_time) <= gSavedSettings.getS32("ToastOpaqueTime")) + if ((mToastLifetime - elapsed_time) <= mToastFadingTime) { setBackgroundOpaque(FALSE); } -- cgit v1.2.3