From c159d9165dda268f3d8d16e95dac81bc8a9e12be Mon Sep 17 00:00:00 2001
From: Dmitry Oleshko <doleshko@productengine.com>
Date: Mon, 14 Dec 2009 16:09:29 +0200
Subject: fixed normal bug (EXT-1093) Dialog boxes should be centered in the
 viewport(game area)

Alert dialogs' behavior was broken in 6132:32b8dcff3b67 of PE brunch

--HG--
branch : product-engine
---
 indra/newview/llscreenchannel.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 79bae76e5f..78cc7c54dc 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -184,15 +184,16 @@ void LLScreenChannel::updatePositionAndSize(LLRect old_world_rect, LLRect new_wo
 	S32 right_delta = old_world_rect.mRight - new_world_rect.mRight;
 	LLRect this_rect = getRect();
 
-	this_rect.mTop = (S32) (new_world_rect.getHeight() * getHeightRatio());
 	switch(mChannelAlignment)
 	{
 	case CA_LEFT :
+		this_rect.mTop = (S32) (new_world_rect.getHeight() * getHeightRatio());
 		break;
 	case CA_CENTRE :
-		this_rect.setCenterAndSize(new_world_rect.getWidth() / 2, new_world_rect.getHeight() / 2, this_rect.getWidth(), this_rect.getHeight());
-		break;
+		LLScreenChannelBase::updatePositionAndSize(old_world_rect, new_world_rect);
+		return;
 	case CA_RIGHT :
+		this_rect.mTop = (S32) (new_world_rect.getHeight() * getHeightRatio());
 		this_rect.mLeft -= right_delta;
 		this_rect.mRight -= right_delta;
 	}
-- 
cgit v1.2.3