summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llimfloatercontainer.cpp36
1 files changed, 17 insertions, 19 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index f6bcf8bbe9..34a9758c52 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -103,24 +103,7 @@ BOOL LLIMFloaterContainer::postBuild()
void LLIMFloaterContainer::onOpen(const LLSD& key)
{
- if (getFloaterCount() == 0)
- {
- // We always force the opening of the nearby chat conversation when we open for the first time
- // *TODO: find a way to move this to XML as a default panel or something like that
- LLSD name("chat_bar");
- LLFloaterReg::toggleInstanceOrBringToFront(name);
- }
LLMultiFloater::onOpen(key);
- /*
- if (key.isDefined())
- {
- LLIMFloater* im_floater = LLIMFloater::findInstance(key.asUUID());
- if (im_floater)
- {
- im_floater->openFloater();
- }
- }
- */
}
// virtual
@@ -307,6 +290,20 @@ void LLIMFloaterContainer::tabClose()
void LLIMFloaterContainer::setVisible(BOOL visible)
{
+ if (visible)
+ {
+ // Make sure we have the Nearby Chat present when showing the conversation container
+ LLUUID nearbychat_uuid = LLUUID::null; // Hacky but true: the session id for nearby chat is null
+ conversations_items_map::iterator item_it = mConversationsItems.find(nearbychat_uuid);
+ if (item_it == mConversationsItems.end())
+ {
+ // If not found, force the creation of the nearby chat conversation panel
+ // *TODO: find a way to move this to XML as a default panel or something like that
+ LLSD name("chat_bar");
+ LLFloaterReg::toggleInstanceOrBringToFront(name);
+ }
+ }
+
// We need to show/hide all the associated conversations that have been torn off
// (and therefore, are not longer managed by the multifloater),
// so that they show/hide with the conversations manager.
@@ -559,8 +556,9 @@ void LLConversationItem::selectItem(void)
void LLConversationItem::setVisibleIfDetached(BOOL visible)
{
- // Do this only if the conversation floater has been torn off (i.e. no multi floater host)
- if (!mFloater->getHost())
+ // Do this only if the conversation floater has been torn off (i.e. no multi floater host) and is not minimized
+ // Note: minimized dockable floaters are brought to front hence unminimized when made visible and we don't want that here
+ if (!mFloater->getHost() && !mFloater->isMinimized())
{
mFloater->setVisible(visible);
}