SL-18153 Fixed bring to front multiple dialog handling

master
Andrey Kleshchev 2022-09-15 01:56:47 +03:00
parent 3248eb87dc
commit dd5aa8f6f4
1 changed files with 5 additions and 3 deletions

View File

@ -112,11 +112,13 @@ void LLModalDialog::onOpen(const LLSD& key)
setFocus(TRUE);
std::list<LLModalDialog*>::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);
}
}