summaryrefslogtreecommitdiff
path: root/indra/llui/llmodaldialog.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-09-16 00:11:53 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-09-16 00:12:02 +0300
commitfe60229dfc4d58ee3b887fd85f9a898834051961 (patch)
treefc9667d6a9c7e12428a109339ce63f7605007a97 /indra/llui/llmodaldialog.cpp
parent329268c5f7520a288e76e253f9bffea9dc212488 (diff)
parentf83289d3a7e80bebe47f696f96aee1b7e64d1d69 (diff)
Merge branch master (DRTVWR-571) into DRTVWR-548-maint-N
Diffstat (limited to 'indra/llui/llmodaldialog.cpp')
-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);
}
}