diff options
| author | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-10-11 12:18:35 -0700 |
|---|---|---|
| committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-10-11 12:18:35 -0700 |
| commit | b871d67710cc4168752dee976725e190c0cd9960 (patch) | |
| tree | f6c56ec4da61c6bcb7331ba5d16aa133742e4eb6 /indra/newview/llimconversation.cpp | |
| parent | 375f380ea388b37c34ace9570822d0c117b3d2f1 (diff) | |
| parent | 0ff5a0c8ceebfab0d786aaf027c7c548170afe8d (diff) | |
merging in latest changes
Diffstat (limited to 'indra/newview/llimconversation.cpp')
| -rw-r--r-- | indra/newview/llimconversation.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp index 2ad7f9b193..9f3c6d0f3d 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,12 @@ 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) + if (!checkIfTornOff()) { + LLIMFloaterContainer* host_floater = dynamic_cast<LLIMFloaterContainer*>(getHost()); // Show the messages pane when opening a floater hosted in the Conversations host_floater->collapseMessagesPane(false); } - - setTornOff(!is_hosted); - updateHeaderAndToolbar(); } // virtual @@ -546,3 +542,16 @@ bool LLIMConversation::isChatMultiTab() // Restart is required in order to change chat window type. return true; } + +bool LLIMConversation::checkIfTornOff() +{ + bool isTorn = !getHost(); + + if (isTorn != isTornOff()) + { + setTornOff(isTorn); + updateHeaderAndToolbar(); + } + + return isTorn; +} |
