summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-09-14 20:52:04 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-09-14 22:50:44 +0300
commitd82d94f41cab2f347ac2b9ff7b9153603c81d39a (patch)
tree7974fe12778bef641c1dd93aae899c1c927d78d1
parent372e5b6dfad34fa0927dcf0446136aee1e338a19 (diff)
SL-18153 Fix invisible blocking popup
Don't add popup to the list twice
-rw-r--r--indra/llui/llmodaldialog.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp
index 5cfa8ea973..50fc6913a9 100644
--- a/indra/llui/llmodaldialog.cpp
+++ b/indra/llui/llmodaldialog.cpp
@@ -100,7 +100,10 @@ void LLModalDialog::onOpen(const LLSD& key)
if (!sModalStack.empty())
{
LLModalDialog* front = sModalStack.front();
- front->setVisible(FALSE);
+ if (front != this)
+ {
+ front->setVisible(FALSE);
+ }
}
// This is a modal dialog. It sucks up all mouse and keyboard operations.
@@ -108,7 +111,12 @@ void LLModalDialog::onOpen(const LLSD& key)
LLUI::getInstance()->addPopup(this);
setFocus(TRUE);
- sModalStack.push_front( this );
+ std::list<LLModalDialog*>::iterator iter = std::find(sModalStack.begin(), sModalStack.end(), this);
+ if (iter == sModalStack.end())
+ {
+ sModalStack.push_front(this);
+ }
+ // else act like it is a 'bring to front'
}
}