diff options
| author | Monroe Linden <monroe@lindenlab.com> | 2010-12-02 14:33:42 -0800 |
|---|---|---|
| committer | Monroe Linden <monroe@lindenlab.com> | 2010-12-02 14:33:42 -0800 |
| commit | 1e050c2ed87ae2093623fa4c66a69aeee1fb980c (patch) | |
| tree | ff9bf66608dc3b9c4459daa68ec99a3065182aac /indra/newview/llmoveview.cpp | |
| parent | 36954908632d6f5366f6517023676c1bcd71aa17 (diff) | |
| parent | d276950c8d4d53f9d5d6497d5a4a4582c499938a (diff) | |
merge
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 d38bb5aa4a..ad1df3c0bb 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,10 +738,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); } |
