diff options
| author | Richard Linden <none@none> | 2010-12-08 16:04:07 -0800 |
|---|---|---|
| committer | Richard Linden <none@none> | 2010-12-08 16:04:07 -0800 |
| commit | ca2141ce90d484284bf57d72feb82e290958b061 (patch) | |
| tree | 0e2ea77f0b7c2a9c9f9e69c09c0be22567afac3b /indra/newview/llmoveview.cpp | |
| parent | d9b4570883652d647c05083c18fac1a088efd6e2 (diff) | |
| parent | c28b476a6806a426593e6798ea537f13ca354fc8 (diff) | |
merge with viewer-dev
Diffstat (limited to 'indra/newview/llmoveview.cpp')
| -rw-r--r-- | indra/newview/llmoveview.cpp | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 89d551f129..142ee40cc8 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -449,17 +449,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 @@ -736,10 +739,18 @@ 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; + S32 x = 0; + if (movement_btn) + { + // Align centers of the button and the panel. + x = movement_btn->calcScreenRect().getCenterX() - getRect().getWidth()/2; + } + else + { + x = tray->calcScreenRect().getCenterX() - getRect().getWidth()/2; + } setOrigin(x, 0); } |
