From 0b7bd115ad118a5792e4f835fe50ac6606fd0874 Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine <vsavchuk@productengine.com>
Date: Wed, 23 Nov 2011 19:21:52 +0200
Subject: [PATCH] EXP-1577 FOLLOWUP Making default My Profile window size the
 same as size of other residents' profile floaters.

---
 indra/newview/llavataractions.cpp | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 7f6abb09375..2f331bdab12 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -302,25 +302,26 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids)
 	make_ui_sound("UISndStartIM");
 }
 
+static const char* get_profile_floater_name(const LLUUID& avatar_id)
+{
+	// Use different floater XML for our profile to be able to save its rect.
+	return avatar_id == gAgentID ? "my_profile" : "profile";
+}
+
 static const LLRect& get_preferred_profile_rect(const LLUUID& avatar_id)
 {
-	if (avatar_id == gAgentID)
+	if (avatar_id == gAgentID &&
+		LLFloaterReg::getInstance(get_profile_floater_name(avatar_id))->hasSavedRect())
 	{
-		return LLRect::null; // no preference
+		return LLRect::null; // no preference, use saved rect
 	}
 
-	// Preferred size for all residents' profiles except our own,
-	// for which saved_rect will be used.
+	// Preferred size for all residents' profiles
+	// and default size for our own profile.
 	static LLCachedControl<LLRect> profile_rect(gSavedSettings, "WebProfileRect");
 	return profile_rect;
 }
 
-static const char* get_profile_floater_name(const LLUUID& avatar_id)
-{
-	// Use different floater XML for our profile to be able to save its rect.
-	return avatar_id == gAgentID ? "my_profile" : "profile";
-}
-
 static void on_avatar_name_show_profile(const LLUUID& agent_id, const LLAvatarName& av_name)
 {
 	std::string username = av_name.mUsername;
-- 
GitLab