diff options
author | Merov Linden <merov@lindenlab.com> | 2011-10-26 13:21:35 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2011-10-26 13:21:35 -0700 |
commit | 5c4812015624ca31664a5ceb4c8998156286bd80 (patch) | |
tree | 9d083176542c25d3ce2f68a3576fb01fac1f6a8f /indra/llui | |
parent | f3c0bbf1620a3a65eaa517903467a2a65681e106 (diff) | |
parent | 06cb4e86027ab90ab5960649beb342d3c85c41ba (diff) |
Pull from /paulgproductengine/exp-1417/
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/lldockcontrol.cpp | 19 | ||||
-rw-r--r-- | indra/llui/lldockcontrol.h | 3 |
2 files changed, 14 insertions, 8 deletions
diff --git a/indra/llui/lldockcontrol.cpp b/indra/llui/lldockcontrol.cpp index 8cb2e57b98..af39e41fa6 100644 --- a/indra/llui/lldockcontrol.cpp +++ b/indra/llui/lldockcontrol.cpp @@ -100,12 +100,16 @@ void LLDockControl::repositionDockable() if (!mDockWidget) return; LLRect dockRect = mDockWidget->calcScreenRect(); LLRect rootRect; + LLRect floater_rect = mDockableFloater->calcScreenRect(); mGetAllowedRectCallback(rootRect); - // recalculate dockable position if dock position changed, dock visibility changed, - // root view rect changed or recalculation is forced - if (mPrevDockRect != dockRect || mDockWidgetVisible != isDockVisible() - || mRootRect != rootRect || mRecalculateDocablePosition) + // recalculate dockable position if: + if (mPrevDockRect != dockRect //dock position changed + || mDockWidgetVisible != isDockVisible() //dock visibility changed + || mRootRect != rootRect //root view rect changed + || mFloaterRect != floater_rect //floater rect changed + || mRecalculateDockablePosition //recalculation is forced + ) { // undock dockable and off() if dock not visible if (!isDockVisible()) @@ -136,7 +140,8 @@ void LLDockControl::repositionDockable() mPrevDockRect = dockRect; mRootRect = rootRect; - mRecalculateDocablePosition = false; + mFloaterRect = floater_rect; + mRecalculateDockablePosition = false; mDockWidgetVisible = isDockVisible(); } } @@ -341,7 +346,7 @@ void LLDockControl::on() if (isDockVisible()) { mEnabled = true; - mRecalculateDocablePosition = true; + mRecalculateDockablePosition = true; } } @@ -352,7 +357,7 @@ void LLDockControl::off() void LLDockControl::forceRecalculatePosition() { - mRecalculateDocablePosition = true; + mRecalculateDockablePosition = true; } void LLDockControl::drawToungue() diff --git a/indra/llui/lldockcontrol.h b/indra/llui/lldockcontrol.h index 463223fafd..c9602011f6 100644 --- a/indra/llui/lldockcontrol.h +++ b/indra/llui/lldockcontrol.h @@ -80,12 +80,13 @@ private: private: get_allowed_rect_callback_t mGetAllowedRectCallback; bool mEnabled; - bool mRecalculateDocablePosition; + bool mRecalculateDockablePosition; bool mDockWidgetVisible; DocAt mDockAt; LLView* mDockWidget; LLRect mPrevDockRect; LLRect mRootRect; + LLRect mFloaterRect; LLFloater* mDockableFloater; LLUIImagePtr mDockTongue; S32 mDockTongueX; |