summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMaximB ProductEngine <mberezhnoy@productengine.com>2012-10-10 20:04:56 +0300
committerMaximB ProductEngine <mberezhnoy@productengine.com>2012-10-10 20:04:56 +0300
commit8b4423d428a0a209711eb18cc003d9ca4970e17a (patch)
tree91181e321dfe757b87f193228ab18d63da6dc39a /indra/newview
parent93e36340ec895a44d0b0bc73157fe23279883863 (diff)
CHUI-377 (Icons in message panel out of position when nearby chat conversation selected)
FIXED
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llimconversation.cpp33
-rw-r--r--indra/newview/llimconversation.h2
2 files changed, 24 insertions, 11 deletions
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<LLIMFloaterContainer*>(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<LLIMFloaterContainer*>(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
diff --git a/indra/newview/llimconversation.h b/indra/newview/llimconversation.h
index c54081d316..0960d6db88 100644
--- a/indra/newview/llimconversation.h
+++ b/indra/newview/llimconversation.h
@@ -138,6 +138,8 @@ private:
*/
void reshapeChatHistory();
+ bool checkIfTornOff();
+
LLTimer* mRefreshTimer; ///< Defines the rate at which refresh() is called.
bool mHadFocus;