summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimcontainer.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-03-06 18:45:40 -0800
committerMerov Linden <merov@lindenlab.com>2013-03-06 18:45:40 -0800
commit179195241f5579ceeea682d7faf23dc2376338ec (patch)
treeaef237271227a9faccc1414173c7efd6d4c5657a /indra/newview/llfloaterimcontainer.cpp
parent4458986cf22a749d3387085a70ea07930519b8ab (diff)
parent236eefd9c8afbdd1f9e8b32cd8d356a6c0b6b2ac (diff)
Pull merge from lindenlab/viewer-chui
Diffstat (limited to 'indra/newview/llfloaterimcontainer.cpp')
-rw-r--r--indra/newview/llfloaterimcontainer.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 46ec1d510d..a0c386717b 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -758,11 +758,21 @@ void LLFloaterIMContainer::assignResizeLimits()
// between the panels are merged into one
S32 number_of_visible_borders = llmin((is_conv_pane_expanded? 2 : 0) + (is_msg_pane_expanded? 2 : 0), 3);
S32 summary_width_of_visible_borders = number_of_visible_borders * LLPANEL_BORDER_WIDTH;
- S32 conv_pane_current_width = is_msg_pane_expanded
- ? mConversationsPane->getRect().getWidth()
- : (is_conv_pane_expanded? mConversationsPane->getExpandedMinDim() : mConversationsPane->getMinDim());
+ S32 conv_pane_target_width = is_conv_pane_expanded?
+ (is_msg_pane_expanded?
+ mConversationsPane->getRect().getWidth()
+ : mConversationsPane->getExpandedMinDim())
+ : mConversationsPane->getMinDim();
S32 msg_pane_min_width = is_msg_pane_expanded ? mMessagesPane->getExpandedMinDim() : 0;
- S32 new_min_width = conv_pane_current_width + msg_pane_min_width + summary_width_of_visible_borders;
+ S32 new_min_width = conv_pane_target_width + msg_pane_min_width + summary_width_of_visible_borders;
+
+ if (is_conv_pane_expanded)
+ {
+ // Save the conversations pane width.
+ gSavedPerAccountSettings.setS32(
+ "ConversationsListPaneWidth",
+ mConversationsPane->getRect().getWidth());
+ }
setResizeLimits(new_min_width, getMinHeight());
}
@@ -1947,10 +1957,10 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
// Most of the time the user will never see this state.
setMinimized(FALSE);
- S32 conv_pane_width = mConversationsPane->getRect().getWidth();
-
- // Save the conversations pane width before collapsing it.
- gSavedPerAccountSettings.setS32("ConversationsListPaneWidth", conv_pane_width);
+ // Save the conversations pane width.
+ gSavedPerAccountSettings.setS32(
+ "ConversationsListPaneWidth",
+ mConversationsPane->getRect().getWidth());
LLFloater::closeFloater(app_quitting);
}