summaryrefslogtreecommitdiff
path: root/indra/llui/llfloater.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rw-r--r--indra/llui/llfloater.cpp31
1 files changed, 12 insertions, 19 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 3ba56c6da1..ccd60dc536 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -506,7 +506,6 @@ void LLFloater::enableResizeCtrls(bool enable, bool width, bool height)
void LLFloater::destroy()
{
- gFloaterView->onDestroyFloater(this);
// LLFloaterReg should be synchronized with "dead" floater to avoid returning dead instance before
// it was deleted via LLMortician::updateClass(). See EXT-8458.
LLFloaterReg::removeInstance(mInstanceName, mKey);
@@ -2407,8 +2406,7 @@ LLFloaterView::LLFloaterView (const Params& p)
mFocusCycleMode(false),
mMinimizePositionVOffset(0),
mSnapOffsetBottom(0),
- mSnapOffsetRight(0),
- mFrontChild(NULL)
+ mSnapOffsetRight(0)
{
mSnapView = getHandle();
}
@@ -2564,7 +2562,8 @@ void LLFloaterView::bringToFront(LLFloater* child, bool give_focus, bool restore
if (!child)
return;
- if (mFrontChild == child)
+ LLFloater* front_child = mFrontChildHandle.get();
+ if (front_child == child)
{
if (give_focus && child->canFocusStealFrontmost() && !gFocusMgr.childHasKeyboardFocus(child))
{
@@ -2573,12 +2572,12 @@ void LLFloaterView::bringToFront(LLFloater* child, bool give_focus, bool restore
return;
}
- if (mFrontChild)
+ if (front_child && front_child->getVisible())
{
- mFrontChild->goneFromFront();
+ front_child->goneFromFront();
}
- mFrontChild = child;
+ mFrontChildHandle = child->getHandle();
// *TODO: make this respect floater's mAutoFocus value, instead of
// using parameter
@@ -3077,7 +3076,8 @@ LLFloater *LLFloaterView::getBackmost() const
void LLFloaterView::syncFloaterTabOrder()
{
- if (mFrontChild && !mFrontChild->isDead() && mFrontChild->getIsChrome())
+ LLFloater* front_child = mFrontChildHandle.get();
+ if (front_child && front_child->getIsChrome())
return;
// look for a visible modal dialog, starting from first
@@ -3115,11 +3115,12 @@ void LLFloaterView::syncFloaterTabOrder()
LLFloater* floaterp = dynamic_cast<LLFloater*>(*child_it);
if (gFocusMgr.childHasKeyboardFocus(floaterp))
{
- if (mFrontChild != floaterp)
+ LLFloater* front_child = mFrontChildHandle.get();
+ if (front_child != floaterp)
{
// Grab a list of the top floaters that want to stay on top of the focused floater
std::list<LLFloater*> listTop;
- if (mFrontChild && !mFrontChild->canFocusStealFrontmost())
+ if (front_child && !front_child->canFocusStealFrontmost())
{
for (LLView* childp : *getChildList())
{
@@ -3139,7 +3140,7 @@ void LLFloaterView::syncFloaterTabOrder()
{
sendChildToFront(childp);
}
- mFrontChild = listTop.back();
+ mFrontChildHandle = listTop.back()->getHandle();
}
}
@@ -3235,14 +3236,6 @@ void LLFloaterView::setToolbarRect(LLToolBarEnums::EToolBarLocation tb, const LL
}
}
-void LLFloaterView::onDestroyFloater(LLFloater* floater)
-{
- if (mFrontChild == floater)
- {
- mFrontChild = nullptr;
- }
-}
-
void LLFloater::setInstanceName(const std::string& name)
{
if (name != mInstanceName)