diff options
-rw-r--r-- | indra/newview/llmoveview.cpp | 23 | ||||
-rw-r--r-- | indra/newview/llmoveview.h | 1 |
2 files changed, 6 insertions, 18 deletions
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index afca9daa67..6ae4a5e5e4 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -144,18 +144,6 @@ BOOL LLFloaterMove::postBuild() return TRUE; } -// virtual -void LLFloaterMove::setEnabled(BOOL enabled) -{ - //we need to enable/disable only buttons, EXT-1061. - - // is called before postBuild() - use findChild here. - LLPanel *panel_actions = findChild<LLPanel>("panel_actions"); - if (panel_actions) panel_actions->setEnabled(enabled); - - showModeButtons(enabled); -} - // *NOTE: we assume that setVisible() is called on floater close. // virtual void LLFloaterMove::setVisible(BOOL visible) @@ -406,7 +394,7 @@ void LLFloaterMove::initMovementMode() if (isAgentAvatarValid()) { - setEnabled(!gAgentAvatarp->isSitting()); + showModeButtons(!gAgentAvatarp->isSitting()); } } @@ -476,8 +464,7 @@ void LLFloaterMove::sUpdateFlyingStatus() void LLFloaterMove::showModeButtons(BOOL bShow) { - // is called from setEnabled so can be called before postBuild(), check mModeActionsPanel agains to NULL - if (NULL == mModeActionsPanel || mModeActionsPanel->getVisible() == bShow) + if (mModeActionsPanel->getVisible() == bShow) return; mModeActionsPanel->setVisible(bShow); } @@ -488,12 +475,14 @@ void LLFloaterMove::enableInstance(BOOL bEnable) LLFloaterMove* instance = LLFloaterReg::findTypedInstance<LLFloaterMove>("moveview"); if (instance) { - instance->setEnabled(bEnable); - if (gAgent.getFlying()) { instance->showModeButtons(FALSE); } + else + { + instance->showModeButtons(bEnable); + } } } diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h index fcf643f050..d463861188 100644 --- a/indra/newview/llmoveview.h +++ b/indra/newview/llmoveview.h @@ -55,7 +55,6 @@ private: public: /*virtual*/ BOOL postBuild(); - /*virtual*/ void setEnabled(BOOL enabled); /*virtual*/ void setVisible(BOOL visible); static F32 getYawRate(F32 time); static void setFlyingMode(BOOL fly); |