diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h index 89c9852f4a..0e7c201bdf 100755 --- a/indra/llui/lldockablefloater.h +++ b/indra/llui/lldockablefloater.h @@ -130,8 +130,9 @@ protected: // It may be useful e.g. if floater created in mouselook mode (see EXT-5609) boost::function mIsDockedStateForcedCallback; -private: +//private: // Make mDockControl accessible from children because of FIRE-16803 std::auto_ptr mDockControl; +private: // Make mDockControl accessible from children because of FIRE-16803 LLUIImagePtr mDockTongue; static LLHandle sInstanceHandle; /** diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 886c82d21e..fe44c40c91 100755 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -950,7 +950,14 @@ LLMultiFloater* LLFloater::getHost() void LLFloater::applyControlsAndPosition(LLFloater* other) { -// if (!applyDockState()) // Don't apply dock state and forget about the undocked values + // 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(); + // { if (!applyRectControl()) { @@ -963,7 +970,6 @@ void LLFloater::applyControlsAndPosition(LLFloater* other) // Don't apply position to undocked IM floater (FIRE-5459) } } - applyDockState(); // Only now apply docked state so floaters don't forget their positions } bool LLFloater::applyRectControl() diff --git a/indra/newview/quickprefs.cpp b/indra/newview/quickprefs.cpp index dcf29c4c9c..4e5301da8b 100644 --- a/indra/newview/quickprefs.cpp +++ b/indra/newview/quickprefs.cpp @@ -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 {