From d82d94f41cab2f347ac2b9ff7b9153603c81d39a Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 14 Sep 2022 20:52:04 +0300 Subject: SL-18153 Fix invisible blocking popup Don't add popup to the list twice --- indra/llui/llmodaldialog.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp index 5cfa8ea973..50fc6913a9 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,12 @@ void LLModalDialog::onOpen(const LLSD& key) LLUI::getInstance()->addPopup(this); setFocus(TRUE); - sModalStack.push_front( this ); + std::list::iterator iter = std::find(sModalStack.begin(), sModalStack.end(), this); + if (iter == sModalStack.end()) + { + sModalStack.push_front(this); + } + // else act like it is a 'bring to front' } } -- cgit v1.2.3 From dd5aa8f6f4224ecec8bc3b2bc5e9018cc7ff83da Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 15 Sep 2022 01:56:47 +0300 Subject: SL-18153 Fixed bring to front multiple dialog handling --- indra/llui/llmodaldialog.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/llui') 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::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); } } -- cgit v1.2.3