summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimcontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterimcontainer.cpp')
-rw-r--r--indra/newview/llfloaterimcontainer.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 5e0cd8ef78..7296ec3ced 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -626,6 +626,12 @@ void LLFloaterIMContainer::setVisible(BOOL visible)
LLMultiFloater::setVisible(visible);
}
+void LLFloaterIMContainer::setVisibleAndFrontmost(BOOL take_focus, const LLSD& key)
+{
+ LLMultiFloater::setVisibleAndFrontmost(take_focus, key);
+ selectConversationPair(getSelectedSession(), false, take_focus);
+}
+
void LLFloaterIMContainer::updateResizeLimits()
{
LLMultiFloater::updateResizeLimits();
@@ -1331,7 +1337,10 @@ void LLFloaterIMContainer::showConversation(const LLUUID& session_id)
selectConversationPair(session_id, true);
LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id);
- session_floater->restoreFloater();
+ if (session_floater)
+ {
+ session_floater->restoreFloater();
+ }
}
void LLFloaterIMContainer::clearAllFlashStates()
@@ -1963,10 +1972,13 @@ bool LLFloaterIMContainer::selectNextorPreviousConversation(bool select_next, bo
void LLFloaterIMContainer::expandConversation()
{
- LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(get_ptr_in_map(mConversationsWidgets,getSelectedSession()));
- if (widget)
+ if(!mConversationsPane->isCollapsed())
{
- widget->setOpen(!widget->isOpen());
+ LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(get_ptr_in_map(mConversationsWidgets,getSelectedSession()));
+ if (widget)
+ {
+ widget->setOpen(!widget->isOpen());
+ }
}
}