From b8b7a61e9e732b16a56ae0bec3b9098ccfd28292 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Mon, 2 Aug 2010 21:00:02 +0300 Subject: EXT-5609 FIXED Avoided showing script floater undocked if it was created in mouselook mode. Commiting on behalf of Alex Productengine. - Added check if floater is constructed in mouselook mode and added forcing dock state when floater is shown after constructing in mouselook mode. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/830/ --HG-- branch : product-engine --- indra/llui/lldockablefloater.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'indra/llui/lldockablefloater.cpp') diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp index 4f5fcddbf4..f9983278d1 100644 --- a/indra/llui/lldockablefloater.cpp +++ b/indra/llui/lldockablefloater.cpp @@ -50,6 +50,7 @@ void LLDockableFloater::init(LLDockableFloater* thiz) thiz->setCanDock(true); thiz->setCanMinimize(TRUE); thiz->setOverlapsScreenChannel(false); + thiz->mForceDocking = false; } LLDockableFloater::LLDockableFloater(LLDockControl* dockControl, @@ -81,6 +82,12 @@ LLDockableFloater::~LLDockableFloater() BOOL LLDockableFloater::postBuild() { + // Remember we should force docking when the floater is opened for the first time + if (mIsDockedStateForcedCallback != NULL && mIsDockedStateForcedCallback()) + { + mForceDocking = true; + } + mDockTongue = LLUI::getUIImage("windows/Flyout_Pointer.png"); LLFloater::setDocked(true); return LLView::postBuild(); @@ -134,6 +141,14 @@ void LLDockableFloater::resetInstance() void LLDockableFloater::setVisible(BOOL visible) { + // Force docking if requested + if (visible && mForceDocking) + { + setCanDock(true); + setDocked(true); + mForceDocking = false; + } + if(visible && isDocked()) { resetInstance(); -- cgit v1.2.3