viewer#1033 Crash at syncFloaterTabOrder
parent
757655d7c3
commit
689ef94425
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
||||
//
|
||||
|
|
|
|||
Loading…
Reference in New Issue