diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-09-15 23:08:53 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-09-15 23:08:53 +0300 |
commit | 7957946f906ddc3b218da9581d0711869dcfb091 (patch) | |
tree | e54f2e0b3c802e159284ba5d67208e331e017e0f /indra/llui | |
parent | b5861e58cb802118796d6a6ba7f45c8e8f67690b (diff) | |
parent | f83289d3a7e80bebe47f696f96aee1b7e64d1d69 (diff) |
Merge branch 'master' into DRTVWR-565-maint-P
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llmodaldialog.cpp | 14 |
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); } } |