summaryrefslogtreecommitdiff
path: root/indra/newview/lltoast.cpp
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2018-05-22 14:24:09 +0300
committermaxim_productengine <mnikolenko@productengine.com>2018-05-22 14:24:09 +0300
commit250a0396ac2c8af0a8139b50b55c81f036d37def (patch)
treeb9cd6b2c43a11841f5af4f2fe8f5e911a54815a3 /indra/newview/lltoast.cpp
parent7fc86d1a99245556e7f886dd75546716d4a30cc8 (diff)
MAINT-8635 Don't allow using 'close all windows' if modal toast is open
Diffstat (limited to 'indra/newview/lltoast.cpp')
-rw-r--r--indra/newview/lltoast.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index edde7c8076..b9b05966bc 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -34,6 +34,7 @@
#include "llviewercontrol.h"
using namespace LLNotificationsUI;
+std::list<LLToast*> LLToast::sModalToastsList;
//--------------------------------------------------------------------------
LLToastLifeTimer::LLToastLifeTimer(LLToast* toast, F32 period)
@@ -143,6 +144,11 @@ LLToast::LLToast(const LLToast::Params& p)
{
mOnDeleteToastSignal.connect(p.on_delete_toast());
}
+
+ if (isModal())
+ {
+ sModalToastsList.push_front(this);
+ }
}
void LLToast::reshape(S32 width, S32 height, BOOL called_from_parent)
@@ -187,6 +193,15 @@ LLToast::~LLToast()
{
mOnToastDestroyedSignal(this);
}
+
+ if (isModal())
+ {
+ std::list<LLToast*>::iterator iter = std::find(sModalToastsList.begin(), sModalToastsList.end(), this);
+ if (iter != sModalToastsList.end())
+ {
+ sModalToastsList.erase(iter);
+ }
+ }
}
//--------------------------------------------------------------------------