diff options
author | Callum Prentice <callum@lindenlab.com> | 2023-05-17 11:31:45 -0700 |
---|---|---|
committer | Callum Prentice <callum@lindenlab.com> | 2023-05-17 11:31:45 -0700 |
commit | f45e888c903bc7a4953b2812e6c30721a4322d1b (patch) | |
tree | dc76eefe00474e27ad2981f0d922fec617d1b9ad /indra/newview/lltoast.cpp | |
parent | 671978e3927bc3ba9fc34008bbb7efd6f07b6c81 (diff) | |
parent | 5a70639b7992842a9f74ec81b11bac56608b8f2e (diff) |
Some small tweaks after merge with Viewer release
Diffstat (limited to 'indra/newview/lltoast.cpp')
-rw-r--r-- | indra/newview/lltoast.cpp | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index bf56a10d4d..223aaad811 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -220,7 +220,11 @@ void LLToast::hide() /*virtual*/ void LLToast::setFocus(BOOL b) { - if (b && !hasFocus() && mPanel) + if (b + && !hasFocus() + && mPanel + && mWrapperPanel + && !mWrapperPanel->getChildList()->empty()) { LLModalDialog::setFocus(TRUE); // mostly for buttons @@ -416,15 +420,18 @@ void LLToast::setVisible(BOOL show) //hide "hide" button in case toast was hidden without mouse_leave if(mHideBtn) mHideBtn->setVisible(show); - } - LLFloater::setVisible(show); - if(mPanel) - { - if(!mPanel->isDead()) - { - mPanel->setVisible(show); - } - } + } + LLFloater::setVisible(show); + if (mPanel + && !mPanel->isDead() + && mWrapperPanel + && !mWrapperPanel->getChildList()->empty() + // LLInspectToast can take over, but LLToast still appears to act like a data storage + && mPanel->getParent() == mWrapperPanel + ) + { + mPanel->setVisible(show); + } } void LLToast::updateHoveredState() |