SL-18153 Fix invisible blocking popup

Don't add popup to the list twice
master
Andrey Kleshchev 2022-09-14 20:52:04 +03:00
parent 372e5b6dfa
commit d82d94f41c
1 changed files with 10 additions and 2 deletions

View File

@ -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<LLModalDialog*>::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'
}
}