diff options
| author | Dave Parks <davep@lindenlab.com> | 2022-09-16 16:25:38 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2022-09-16 16:25:38 -0500 |
| commit | 09f3d6eaeea79aa2e46644cfb4badd11d429525b (patch) | |
| tree | 6f2d915bbf8bdb95466943e4d9ac377cee823440 /indra/llui/llmodaldialog.cpp | |
| parent | 8dc59e5ef37836b15d478fb0d04e3043a9f986de (diff) | |
| parent | 1478cacfcda16162bd3d854a275afcc6a41852dd (diff) | |
Merge branch 'DRTVWR-559' of ssh://bitbucket.org/lindenlab/viewer into DRTVWR-559
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); } } |
