summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2022-09-15 14:35:17 -0400
committerNat Goodspeed <nat@lindenlab.com>2022-09-15 14:35:17 -0400
commitf83289d3a7e80bebe47f696f96aee1b7e64d1d69 (patch)
tree432a98e2c8e662dad4e20811a570ee3e81906b2b /indra/llui
parentc2a27c474dc11dff4f93b0bd319cfec7de27bb22 (diff)
parentdd5aa8f6f4224ecec8bc3b2bc5e9018cc7ff83da (diff)
DRTVWR-571: Belated merge of DRTVWR-544 version bump.
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llmodaldialog.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp
index 5cfa8ea973..3e5978eb59 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,14 @@ 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())
+ {
+ // if already present, we want to move it to front.
+ sModalStack.erase(iter);
+ }
+
+ sModalStack.push_front(this);
}
}