From 8b4423d428a0a209711eb18cc003d9ca4970e17a Mon Sep 17 00:00:00 2001 From: MaximB ProductEngine Date: Wed, 10 Oct 2012 20:04:56 +0300 Subject: CHUI-377 (Icons in message panel out of position when nearby chat conversation selected) FIXED --- indra/newview/llimconversation.cpp | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'indra/newview/llimconversation.cpp') diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp index 2ad7f9b193..3b334df189 100644 --- a/indra/newview/llimconversation.cpp +++ b/indra/newview/llimconversation.cpp @@ -393,7 +393,7 @@ void LLIMConversation::updateHeaderAndToolbar() // prevent start conversation before its container LLIMFloaterContainer::getInstance(); - bool is_torn_off = !getHost(); + bool is_torn_off = checkIfTornOff(); if (!is_torn_off) { hideAllStandardButtons(); @@ -505,16 +505,7 @@ void LLIMConversation::onSlide(LLIMConversation* self) /*virtual*/ void LLIMConversation::onOpen(const LLSD& key) { - LLIMFloaterContainer* host_floater = dynamic_cast(getHost()); - bool is_hosted = !!host_floater; - if (is_hosted) - { - // Show the messages pane when opening a floater hosted in the Conversations - host_floater->collapseMessagesPane(false); - } - - setTornOff(!is_hosted); - updateHeaderAndToolbar(); + checkIfTornOff(); } // virtual @@ -546,3 +537,23 @@ bool LLIMConversation::isChatMultiTab() // Restart is required in order to change chat window type. return true; } + +bool LLIMConversation::checkIfTornOff() +{ + bool isTorn = !getHost(); + if (!isTorn) + { + LLIMFloaterContainer* host_floater = dynamic_cast(getHost()); + + // Show the messages pane when opening a floater hosted in the Conversations + host_floater->collapseMessagesPane(false); + } + + if (isTorn != isTornOff()) + { + setTornOff(isTorn); + updateHeaderAndToolbar(); + } + + return isTorn; +} \ No newline at end of file -- cgit v1.3 From 82e5649fba22f7fa0cb4744f632aa836f0855f85 Mon Sep 17 00:00:00 2001 From: MaximB ProductEngine Date: Thu, 11 Oct 2012 14:06:35 +0300 Subject: CHUI-377 (Icons in message panel out of position when nearby chat conversation selected) Fixed bug with collapsing messages pane --- indra/newview/llimconversation.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'indra/newview/llimconversation.cpp') diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp index 3b334df189..9f3c6d0f3d 100644 --- a/indra/newview/llimconversation.cpp +++ b/indra/newview/llimconversation.cpp @@ -505,7 +505,12 @@ void LLIMConversation::onSlide(LLIMConversation* self) /*virtual*/ void LLIMConversation::onOpen(const LLSD& key) { - checkIfTornOff(); + if (!checkIfTornOff()) + { + LLIMFloaterContainer* host_floater = dynamic_cast(getHost()); + // Show the messages pane when opening a floater hosted in the Conversations + host_floater->collapseMessagesPane(false); + } } // virtual @@ -541,13 +546,6 @@ bool LLIMConversation::isChatMultiTab() bool LLIMConversation::checkIfTornOff() { bool isTorn = !getHost(); - if (!isTorn) - { - LLIMFloaterContainer* host_floater = dynamic_cast(getHost()); - - // Show the messages pane when opening a floater hosted in the Conversations - host_floater->collapseMessagesPane(false); - } if (isTorn != isTornOff()) { @@ -556,4 +554,4 @@ bool LLIMConversation::checkIfTornOff() } return isTorn; -} \ No newline at end of file +} -- cgit v1.3