diff options
Diffstat (limited to 'indra/newview/llimfloatercontainer.cpp')
-rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index cf4d054dd5..7821f2ee0d 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -222,6 +222,7 @@ BOOL LLIMFloaterContainer::postBuild() void LLIMFloaterContainer::onOpen(const LLSD& key) { LLMultiFloater::onOpen(key); + openNearbyChat(); } // virtual @@ -508,6 +509,7 @@ void LLIMFloaterContainer::setVisible(BOOL visible) LLSD name("nearby_chat"); LLFloaterReg::toggleInstanceOrBringToFront(name); } + openNearbyChat(); } nearby_chat = LLFloaterReg::findTypedInstance<LLNearbyChat>("nearby_chat"); @@ -1491,4 +1493,18 @@ void LLIMFloaterContainer::toggleAllowTextChat(const LLUUID& participant_uuid) } } +void LLIMFloaterContainer::openNearbyChat() +{ + // If there's only one conversation in the container and that conversation is the nearby chat + //(which it should be...), open it so to make the list of participants visible. This happens to be the most common case when opening the Chat floater. + if(mConversationsItems.size() == 1) + { + LLConversationViewSession* nearby_chat = dynamic_cast<LLConversationViewSession*>(mConversationsWidgets[LLUUID()]); + if (nearby_chat) + { + nearby_chat->setOpen(TRUE); + } + } +} + // EOF |