summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-11-23 19:21:52 +0200
committerVadim ProductEngine <vsavchuk@productengine.com>2011-11-23 19:21:52 +0200
commit0b7bd115ad118a5792e4f835fe50ac6606fd0874 (patch)
tree376860d0f48b9a1e59c38bffe7086fd157f7100f
parent710d2fd0f34484495fa494eefa2ffc1cdb3087e3 (diff)
EXP-1577 FOLLOWUP Making default My Profile window size the same as size of other residents' profile floaters.
-rwxr-xr-xindra/newview/llavataractions.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 7f6abb0937..2f331bdab1 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;