diff options
author | Brad Kittenbrink <brad@lindenlab.com> | 2022-11-28 14:33:27 -0800 |
---|---|---|
committer | Brad Kittenbrink <brad@lindenlab.com> | 2022-11-28 14:33:27 -0800 |
commit | 0b188ac04ecdb1d620a427eacbf5fc089e0accc8 (patch) | |
tree | 76f6afe9424d79bab8d30060d49aec3166d96ec8 /indra/llui/llmodaldialog.cpp | |
parent | e9cd2b320ea2ecaab88e4904f7c81746ea617fea (diff) | |
parent | c8f08f232a28f4e08b4acf525f0d316a101a0e27 (diff) |
Merge remote-tracking branch 'origin/main' into DRTVWR-528
Diffstat (limited to 'indra/llui/llmodaldialog.cpp')
-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); } } |