summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/llfloater.cpp22
-rw-r--r--indra/llui/llfloater.h2
2 files changed, 13 insertions, 11 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index fb90cebd39..cf33d633ad 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -2406,8 +2406,7 @@ LLFloaterView::LLFloaterView (const Params& p)
mFocusCycleMode(FALSE),
mMinimizePositionVOffset(0),
mSnapOffsetBottom(0),
- mSnapOffsetRight(0),
- mFrontChild(NULL)
+ mSnapOffsetRight(0)
{
mSnapView = getHandle();
}
@@ -2563,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))
{
@@ -2572,12 +2572,12 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus, BOOL restore
return;
}
- if (mFrontChild && !mFrontChild->isDead() && mFrontChild->getVisible())
+ 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
@@ -3076,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
@@ -3114,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())
{
@@ -3138,7 +3140,7 @@ void LLFloaterView::syncFloaterTabOrder()
{
sendChildToFront(childp);
}
- mFrontChild = listTop.back();
+ mFrontChildHandle = listTop.back()->getHandle();
}
}
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 5f4e1a2cad..39957386df 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -622,7 +622,7 @@ private:
S32 mMinimizePositionVOffset;
typedef std::vector<std::pair<LLHandle<LLFloater>, boost::signals2::connection> > hidden_floaters_t;
hidden_floaters_t mHiddenFloaters;
- LLFloater * mFrontChild;
+ LLHandle<LLFloater> mFrontChildHandle;
};
//