summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-09-15 01:56:47 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-09-15 01:56:54 +0300
commitdd5aa8f6f4224ecec8bc3b2bc5e9018cc7ff83da (patch)
treefcdc54215c684d3489e850b137745e2c6df0543c /indra/llui
parent3248eb87dc80d7c215c24107f5968eda00ad4a9f (diff)
SL-18153 Fixed bring to front multiple dialog handling
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llmodaldialog.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp
index 50fc6913a9..3e5978eb59 100644
--- a/indra/llui/llmodaldialog.cpp
+++ b/indra/llui/llmodaldialog.cpp
@@ -112,11 +112,13 @@ void LLModalDialog::onOpen(const LLSD& key)
setFocus(TRUE);
std::list<LLModalDialog*>::iterator iter = std::find(sModalStack.begin(), sModalStack.end(), this);
- if (iter == sModalStack.end())
+ if (iter != sModalStack.end())
{
- sModalStack.push_front(this);
+ // if already present, we want to move it to front.
+ sModalStack.erase(iter);
}
- // else act like it is a 'bring to front'
+
+ sModalStack.push_front(this);
}
}