FIRE-16803: Quickprefs floater repositions when opened in undocked state
parent
fc5f5777e1
commit
8057c6c226
|
|
@ -130,8 +130,9 @@ protected:
|
|||
// It may be useful e.g. if floater created in mouselook mode (see EXT-5609)
|
||||
boost::function<BOOL ()> mIsDockedStateForcedCallback;
|
||||
|
||||
private:
|
||||
//private: // <FS:Ansariel> Make mDockControl accessible from children because of FIRE-16803
|
||||
std::auto_ptr<LLDockControl> mDockControl;
|
||||
private: // <FS:Ansariel> Make mDockControl accessible from children because of FIRE-16803
|
||||
LLUIImagePtr mDockTongue;
|
||||
static LLHandle<LLFloater> sInstanceHandle;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -950,7 +950,14 @@ LLMultiFloater* LLFloater::getHost()
|
|||
|
||||
void LLFloater::applyControlsAndPosition(LLFloater* other)
|
||||
{
|
||||
// if (!applyDockState()) // <FS:Zi> Don't apply dock state and forget about the undocked values
|
||||
// <FS:Zi> Don't apply dock state and forget about the undocked values
|
||||
// AH: Apply the dock state before applying the rect control. applyDockState
|
||||
// will call SetDocked with pop_on_undock = true and translate the floater
|
||||
// by 12px on the y-axis, so we have to apply the rect control after that
|
||||
// to have it in the right position.
|
||||
// if (!applyDockState())
|
||||
applyDockState();
|
||||
// </FS:Zi>
|
||||
{
|
||||
if (!applyRectControl())
|
||||
{
|
||||
|
|
@ -963,7 +970,6 @@ void LLFloater::applyControlsAndPosition(LLFloater* other)
|
|||
// </FS:Ansariel> Don't apply position to undocked IM floater (FIRE-5459)
|
||||
}
|
||||
}
|
||||
applyDockState(); // <FS:Zi> Only now apply docked state so floaters don't forget their positions
|
||||
}
|
||||
|
||||
bool LLFloater::applyRectControl()
|
||||
|
|
|
|||
|
|
@ -1958,7 +1958,10 @@ void FloaterQuickPrefs::dockToToolbarButton()
|
|||
LLView* anchor_panel = gToolBarView->findChildView("quickprefs");
|
||||
setUseTongue(anchor_panel);
|
||||
// Garbage collected by std::auto_ptr
|
||||
setDockControl(new LLDockControl(anchor_panel, this, getDockTongue(doc_at), doc_at));
|
||||
// Do the actions from setDockControl here, but call setDock with pop_on_undock = false
|
||||
// or we will translate the floater 12px up on the y-axis
|
||||
mDockControl.reset(new LLDockControl(anchor_panel, this, getDockTongue(doc_at), doc_at));
|
||||
setDocked(isDocked(), false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue