From 71d47402514b26ea9adf768582ad7d8cfe1a1c74 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 26 Jan 2010 16:15:26 +0200 Subject: 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 --- indra/newview/llmoveview.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'indra/newview/llmoveview.cpp') diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 0ab3b07aea..de8ea98e05 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -589,8 +589,12 @@ void LLPanelStandStopFlying::setVisible(BOOL visible) updatePosition(); } - //change visibility of parent layout_panel to animate in/out - if (getParent()) getParent()->setVisible(visible); + // 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); + } } BOOL LLPanelStandStopFlying::handleToolTip(S32 x, S32 y, MASK mask) @@ -614,7 +618,7 @@ void LLPanelStandStopFlying::reparent(LLFloaterMove* move_view) LLPanel* parent = dynamic_cast(getParent()); 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; } @@ -684,6 +688,7 @@ void LLPanelStandStopFlying::onStopFlyingButtonClick() gAgent.setFlying(FALSE); setFocus(FALSE); // EXT-482 + setVisible(FALSE); } /** -- cgit v1.2.3 From 3a0226824b7d03f7ad745af995066cfa99833cbc Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 26 Jan 2010 17:04:13 +0200 Subject: Fixed normal bug EXT-4718 ( Stop Flying button is displayed in the mouse look mode) - restore base processing of visibility of Panel with "stand/stop flying" buttons broken in EXT-2504 --HG-- branch : product-engine --- indra/newview/llmoveview.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llmoveview.cpp') diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index de8ea98e05..5981baab60 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -595,6 +595,10 @@ void LLPanelStandStopFlying::setVisible(BOOL visible) //change visibility of parent layout_panel to animate in/out. EXT-2504 if (getParent()) getParent()->setVisible(visible); } + + // also change own visibility to avoid displaying the panel in mouselook (broken when EXT-2504 was implemented). + // See EXT-4718. + LLPanel::setVisible(visible); } BOOL LLPanelStandStopFlying::handleToolTip(S32 x, S32 y, MASK mask) -- cgit v1.2.3 From 943f8afa09480629ad659de9601b36b3dc565246 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 29 Jan 2010 14:25:50 +0200 Subject: Fixed normal bug EXT-4743 ('Stop flying' button disappears if minimize undocked movement controls) - synchronized visibility of "stand_stop_flying_container" with a panel visibility when it is reparented from the Move Floater to container. --HG-- branch : product-engine --- indra/newview/llmoveview.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llmoveview.cpp') diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 5981baab60..4bf2bac649 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -651,6 +651,9 @@ void LLPanelStandStopFlying::reparent(LLFloaterMove* move_view) // Detach from movement controls. parent->removeChild(this); mOriginalParent.get()->addChild(this); + // update parent with self visibility (it is changed in setVisible()). EXT-4743 + mOriginalParent.get()->setVisible(getVisible()); + mAttached = false; updatePosition(); // don't defer until next draw() to avoid flicker } -- cgit v1.2.3