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 | |
parent | cea3c37dcb09eb30cb986ecac4d29a4ff1cc0898 (diff) |
CHUI-172 CHUI-183 FIX Disabled applying stored rect dimensions when Nearby chat is hosted in Conversations floater.
-rw-r--r-- | indra/newview/llimconversation.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llnearbychat.cpp | 32 |
2 files changed, 19 insertions, 17 deletions
diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp index acdd7ba46a..c855a844cf 100644 --- a/indra/newview/llimconversation.cpp +++ b/indra/newview/llimconversation.cpp @@ -254,9 +254,7 @@ void LLIMConversation::updateHeaderAndToolbar() if (mDragHandle) { mDragHandle->setTitleVisible(!is_hosted); - setCanDrag(!is_hosted); } - setCanResize(!is_hosted); // The button (>>) should be disabled for torn off P2P conversations. mExpandCollapseBtn->setEnabled(is_hosted || !mIsP2PChat); @@ -349,8 +347,6 @@ void LLIMConversation::onOpen(const LLSD& key) host_floater->collapseMessagesPane(false); } - setCanResize(TRUE); - updateHeaderAndToolbar(); } 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() |