Skip to content
Snippets Groups Projects
Commit 71d47402 authored by Mike Antipov's avatar Mike Antipov
Browse files

Fixed EXT-4646 ([BSI] Movement controls close after hitting stand)

- reason: fix for bug EXT-2504 (black bars present at top and bottom when in mouselook) (changing parent visibility of panel with "Stand/Stop flying" buttons)
- fix: updated condition to process visibility of the parent of the panel with "Stand/Stop flying" buttons: only if panel is not attached to Move Floater
	NOTE: The same problem was for EXT-3632 (Move floater closes after user click on Stop Flying btn)
	Reverted that fix for Stop flying button to be consistent with "Stand".

--HG--
branch : product-engine
parent cd790bfd
Branches
Tags
No related merge requests found
...@@ -589,9 +589,13 @@ void LLPanelStandStopFlying::setVisible(BOOL visible) ...@@ -589,9 +589,13 @@ void LLPanelStandStopFlying::setVisible(BOOL visible)
updatePosition(); updatePosition();
} }
//change visibility of parent layout_panel to animate in/out // do not change parent visibility in case panel is attached into Move Floater: EXT-3632, EXT-4646
if (!mAttached)
{
//change visibility of parent layout_panel to animate in/out. EXT-2504
if (getParent()) getParent()->setVisible(visible); if (getParent()) getParent()->setVisible(visible);
} }
}
BOOL LLPanelStandStopFlying::handleToolTip(S32 x, S32 y, MASK mask) BOOL LLPanelStandStopFlying::handleToolTip(S32 x, S32 y, MASK mask)
{ {
...@@ -614,7 +618,7 @@ void LLPanelStandStopFlying::reparent(LLFloaterMove* move_view) ...@@ -614,7 +618,7 @@ void LLPanelStandStopFlying::reparent(LLFloaterMove* move_view)
LLPanel* parent = dynamic_cast<LLPanel*>(getParent()); LLPanel* parent = dynamic_cast<LLPanel*>(getParent());
if (!parent) if (!parent)
{ {
llwarns << "Stand/stop flying panel parent is unset" << llendl; llwarns << "Stand/stop flying panel parent is unset, already attached?: " << mAttached << ", new parent: " << (move_view == NULL ? "NULL" : "Move Floater") << llendl;
return; return;
} }
...@@ -684,6 +688,7 @@ void LLPanelStandStopFlying::onStopFlyingButtonClick() ...@@ -684,6 +688,7 @@ void LLPanelStandStopFlying::onStopFlyingButtonClick()
gAgent.setFlying(FALSE); gAgent.setFlying(FALSE);
setFocus(FALSE); // EXT-482 setFocus(FALSE); // EXT-482
setVisible(FALSE);
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment