diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 2af01d06c18cba709c3a60589f32ee0babae1d00..c3d8b91d67ae372bfdf4868470fe41b45cde16bf 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -696,25 +696,28 @@ void LLPanelStandStopFlying::updatePosition()
 {
 	if (mAttached) return;
 
-	S32 x = 0;
-	S32 y = 0;
-
-	if(LLView* root = getRootView())
+	S32 y_pos = 0;
+	S32 bottom_tb_center = 0;
+	if (LLToolBar* toolbar_bottom = gToolBarView->getChild<LLToolBar>("toolbar_bottom"))
 	{
-		x = root->calcScreenRect().getCenterX() - getRect().getWidth()/2;
+		y_pos = toolbar_bottom->getRect().getHeight();
+		bottom_tb_center = toolbar_bottom->getRect().getCenterX();
 	}
 
-	if (LLToolBar* toolbar_bottom = gToolBarView->getChild<LLToolBar>("toolbar_bottom"))
+	S32 left_tb_width = 0;
+	if (LLToolBar* toolbar_left = gToolBarView->getChild<LLToolBar>("toolbar_left"))
 	{
-		y = toolbar_bottom->getRect().getHeight();
+		left_tb_width = toolbar_left->getRect().getWidth();
 	}
 
 	if(LLPanel* panel_ssf_container = getRootView()->getChild<LLPanel>("stand_stop_flying_container"))
 	{
-		panel_ssf_container->setOrigin(0, y);
+		panel_ssf_container->setOrigin(0, y_pos);
 	}
 
-	setOrigin(x, 0);
+	S32 x_pos = bottom_tb_center-getRect().getWidth()/2 - left_tb_width;
+
+	setOrigin( x_pos, 0);
 }
 
 // EOF