summaryrefslogtreecommitdiff
path: root/indra/newview/llmoveview.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2016-09-30 15:56:40 -0700
committerRider Linden <rider@lindenlab.com>2016-09-30 15:56:40 -0700
commitb2eded73b9bf55e2253a9c39113ff0598c2c18cb (patch)
treeb3cd5ce3893e5aa45716628d03e0a49e9616e0b7 /indra/newview/llmoveview.cpp
parentcf83f0a3c210ceabbb6d59e71e35b281d99ba3da (diff)
MAINT-6759: Do not automatically hide the "Stand" button. Rely on the state of the avatar to enable/disable buttons.
Diffstat (limited to 'indra/newview/llmoveview.cpp')
-rw-r--r--indra/newview/llmoveview.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 70035bcc74..c3dd08c327 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -252,7 +252,7 @@ void LLFloaterMove::setSittingMode(BOOL bSitting)
LLPanelStandStopFlying::setStandStopFlyingMode(LLPanelStandStopFlying::SSFM_STOP_FLYING);
}
}
- enableInstance(!bSitting);
+ enableInstance();
}
// protected
@@ -459,7 +459,7 @@ void LLFloaterMove::showModeButtons(BOOL bShow)
}
//static
-void LLFloaterMove::enableInstance(BOOL bEnable)
+void LLFloaterMove::enableInstance()
{
LLFloaterMove* instance = LLFloaterReg::findTypedInstance<LLFloaterMove>("moveview");
if (instance)
@@ -470,7 +470,7 @@ void LLFloaterMove::enableInstance(BOOL bEnable)
}
else
{
- instance->showModeButtons(bEnable);
+ instance->showModeButtons(isAgentAvatarValid() && !gAgentAvatarp->isSitting());
}
}
}
@@ -566,7 +566,7 @@ BOOL LLPanelStandStopFlying::postBuild()
{
mStandButton = getChild<LLButton>("stand_btn");
mStandButton->setCommitCallback(boost::bind(&LLPanelStandStopFlying::onStandButtonClick, this));
- mStandButton->setCommitCallback(boost::bind(&LLFloaterMove::enableInstance, TRUE));
+ mStandButton->setCommitCallback(boost::bind(&LLFloaterMove::enableInstance));
mStandButton->setVisible(FALSE);
LLHints::registerHintTarget("stand_btn", mStandButton->getHandle());
@@ -685,8 +685,7 @@ void LLPanelStandStopFlying::onStandButtonClick()
LLSelectMgr::getInstance()->deselectAllForStandingUp();
gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
- setFocus(FALSE); // EXT-482
- mStandButton->setVisible(FALSE); // force visibility changing to avoid seeing Stand & Move buttons at once.
+ setFocus(FALSE);
}
void LLPanelStandStopFlying::onStopFlyingButtonClick()
@@ -694,7 +693,6 @@ void LLPanelStandStopFlying::onStopFlyingButtonClick()
gAgent.setFlying(FALSE);
setFocus(FALSE); // EXT-482
- mStopFlyingButton->setVisible(FALSE);
}
/**