summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-09-30 20:08:53 -0700
committerRichard Linden <none@none>2010-09-30 20:08:53 -0700
commit1f7ff277d4e0d050f221e76c143f5101fb02d75f (patch)
tree36d97b7e82cfab1323ea28a639d98b02a059dcf0 /indra/newview
parent293071284ce8578edc313d3b0dd57ecfc5c7760d (diff)
EXP-128 FIX Stand button displays partially offscreen
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llmoveview.cpp30
1 files changed, 18 insertions, 12 deletions
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 6658e1d7e8..35c74d290b 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -448,17 +448,20 @@ void LLFloaterMove::updatePosition()
LLBottomTray* tray = LLBottomTray::getInstance();
if (!tray) return;
- LLButton* movement_btn = tray->getChild<LLButton>(BOTTOM_TRAY_BUTTON_NAME);
+ LLButton* movement_btn = tray->findChild<LLButton>(BOTTOM_TRAY_BUTTON_NAME);
- //align centers of a button and a floater
- S32 x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2;
-
- S32 y = 0;
- if (!mModeActionsPanel->getVisible())
+ if (movement_btn)
{
- y = mModeActionsPanel->getRect().getHeight();
+ //align centers of a button and a floater
+ S32 x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2;
+
+ S32 y = 0;
+ if (!mModeActionsPanel->getVisible())
+ {
+ y = mModeActionsPanel->getRect().getHeight();
+ }
+ setOrigin(x, y);
}
- setOrigin(x, y);
}
//static
@@ -735,11 +738,14 @@ void LLPanelStandStopFlying::updatePosition()
LLBottomTray* tray = LLBottomTray::getInstance();
if (!tray || mAttached) return;
- LLButton* movement_btn = tray->getChild<LLButton>(BOTTOM_TRAY_BUTTON_NAME);
+ LLButton* movement_btn = tray->findChild<LLButton>(BOTTOM_TRAY_BUTTON_NAME);
- // Align centers of the button and the panel.
- S32 x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2;
- setOrigin(x, 0);
+ if (movement_btn)
+ {
+ // Align centers of the button and the panel.
+ S32 x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2;
+ setOrigin(x, 0);
+ }
}