Skip to content
Snippets Groups Projects
Commit f5bada7e authored by Igor Borovkov's avatar Igor Borovkov
Browse files

merge

--HG--
branch : product-engine
parents 30a2cf81 40041fc2
No related branches found
No related tags found
No related merge requests found
...@@ -83,11 +83,6 @@ LLFloaterMove::LLFloaterMove(const LLSD& key) ...@@ -83,11 +83,6 @@ LLFloaterMove::LLFloaterMove(const LLSD& key)
{ {
} }
LLFloaterMove::~LLFloaterMove()
{
LLPanelStandStopFlying::getInstance()->reparent(NULL);
}
// virtual // virtual
BOOL LLFloaterMove::postBuild() BOOL LLFloaterMove::postBuild()
{ {
...@@ -161,6 +156,31 @@ void LLFloaterMove::setEnabled(BOOL enabled) ...@@ -161,6 +156,31 @@ void LLFloaterMove::setEnabled(BOOL enabled)
showModeButtons(enabled); showModeButtons(enabled);
} }
// *NOTE: we assume that setVisible() is called on floater close.
// virtual
void LLFloaterMove::setVisible(BOOL visible)
{
// Ignore excessive calls of this method (from LLTransientFloaterMgr?).
if (getVisible() == visible)
return;
if (visible)
{
// Attach the Stand/Stop Flying panel.
LLPanelStandStopFlying* ssf_panel = LLPanelStandStopFlying::getInstance();
ssf_panel->reparent(this);
const LLRect& mode_actions_rect = mModeActionsPanel->getRect();
ssf_panel->setOrigin(mode_actions_rect.mLeft, mode_actions_rect.mBottom);
}
else
{
// Detach the Stand/Stop Flying panel.
LLPanelStandStopFlying::getInstance()->reparent(NULL);
}
LLTransientDockableFloater::setVisible(visible);
}
// static // static
F32 LLFloaterMove::getYawRate( F32 time ) F32 LLFloaterMove::getYawRate( F32 time )
{ {
...@@ -429,16 +449,6 @@ void LLFloaterMove::showModeButtons(BOOL bShow) ...@@ -429,16 +449,6 @@ void LLFloaterMove::showModeButtons(BOOL bShow)
if (NULL == mModeActionsPanel || mModeActionsPanel->getVisible() == bShow) if (NULL == mModeActionsPanel || mModeActionsPanel->getVisible() == bShow)
return; return;
mModeActionsPanel->setVisible(bShow); mModeActionsPanel->setVisible(bShow);
if (bShow)
LLPanelStandStopFlying::getInstance()->reparent(NULL);
else
{
LLPanelStandStopFlying* ssf_panel = LLPanelStandStopFlying::getInstance();
ssf_panel->reparent(this);
const LLRect& mode_actions_rect = mModeActionsPanel->getRect();
ssf_panel->setOrigin(mode_actions_rect.mLeft, mode_actions_rect.mBottom);
}
} }
//static //static
......
...@@ -51,11 +51,12 @@ class LLFloaterMove ...@@ -51,11 +51,12 @@ class LLFloaterMove
private: private:
LLFloaterMove(const LLSD& key); LLFloaterMove(const LLSD& key);
~LLFloaterMove(); ~LLFloaterMove() {}
public: public:
/*virtual*/ BOOL postBuild(); /*virtual*/ BOOL postBuild();
/*virtual*/ void setEnabled(BOOL enabled); /*virtual*/ void setEnabled(BOOL enabled);
/*virtual*/ void setVisible(BOOL visible);
static F32 getYawRate(F32 time); static F32 getYawRate(F32 time);
static void setFlyingMode(BOOL fly); static void setFlyingMode(BOOL fly);
void setFlyingModeImpl(BOOL fly); void setFlyingModeImpl(BOOL fly);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment