diff options
author | Seth ProductEngine <slitovchuk@productengine.com> | 2012-07-04 17:18:48 +0300 |
---|---|---|
committer | Seth ProductEngine <slitovchuk@productengine.com> | 2012-07-04 17:18:48 +0300 |
commit | 22f8301b1dea787e0adda80b2625a8d7d9ddbda4 (patch) | |
tree | 09e3a0d5dc5f69458aa56474f015ef2b868fbef6 /indra/newview/llnearbychat.cpp | |
parent | cea3c37dcb09eb30cb986ecac4d29a4ff1cc0898 (diff) |
CHUI-172 CHUI-183 FIX Disabled applying stored rect dimensions when Nearby chat is hosted in Conversations floater.
Diffstat (limited to 'indra/newview/llnearbychat.cpp')
-rw-r--r-- | indra/newview/llnearbychat.cpp | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index a81d6b4025..13e9eeee66 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -364,20 +364,18 @@ void LLNearbyChat::onOpen(const LLSD& key) bool LLNearbyChat::applyRectControl() { - bool rect_controlled = LLFloater::applyRectControl(); + bool is_torn_off = getHost() == NULL; -/* if (!mNearbyChat->getVisible()) + // Resize is limited to torn off floaters. + // A hosted floater is not resizable. + if (is_torn_off) { - reshape(getRect().getWidth(), getMinHeight()); - enableResizeCtrls(true, true, false); - } - else - {*/ enableResizeCtrls(true); - setResizeLimits(getMinWidth(), EXPANDED_MIN_HEIGHT); -// } + } - return rect_controlled; + setResizeLimits(getMinWidth(), EXPANDED_MIN_HEIGHT); + + return LLFloater::applyRectControl(); } void LLNearbyChat::onChatFontChange(LLFontGL* fontp) @@ -408,9 +406,17 @@ void LLNearbyChat::showHistory() { openFloater(); setResizeLimits(getMinWidth(), EXPANDED_MIN_HEIGHT); - reshape(getRect().getWidth(), mExpandedHeight); - enableResizeCtrls(true); - storeRectControl(); + + bool is_torn_off = getHost() == NULL; + + // Reshape and enable resize controls only if it's a torn off floater. + // Otherwise all the size changes should be handled by LLIMFloaterContainer. + if (is_torn_off) + { + reshape(getRect().getWidth(), mExpandedHeight); + enableResizeCtrls(true); + storeRectControl(); + } } std::string LLNearbyChat::getCurrentChat() |