From ea6a3e8e7801425faa75fdd8a40b7990a58ee0d4 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Mon, 19 Apr 2010 13:32:07 +0300 Subject: Updated the reverted fix for critical bug EXT-1655 ([BSI] Always flying after pressing "Stand" to stand up from an object), also integrated the fix for EXT-6786 ('Stand' button is corrupted if movement control floater is opened). Added some clarifying comments. Reviewed by Tofu Linden at https://codereview.productengine.com/secondlife/r/253/. --HG-- branch : product-engine --- indra/newview/llmoveview.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview/llmoveview.cpp') diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 1853b511be..70053a7b48 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -199,7 +199,12 @@ void LLFloaterMove::setFlyingMode(BOOL fly) if (instance) { instance->setFlyingModeImpl(fly); - instance->showModeButtons(!fly); + LLVOAvatarSelf* avatar_object = gAgent.getAvatarObject(); + BOOL is_sitting = avatar_object + && (avatar_object->getRegion() != NULL) + && (!avatar_object->isDead()) + && avatar_object->isSitting(); + instance->showModeButtons(!fly && !is_sitting); } if (fly) { @@ -695,6 +700,7 @@ void LLPanelStandStopFlying::onStandButtonClick() gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); setFocus(FALSE); // EXT-482 + mStandButton->setVisible(FALSE); // force visibility changing to avoid seeing Stand & Move buttons at once. } void LLPanelStandStopFlying::onStopFlyingButtonClick() -- cgit v1.2.3