summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2012-12-04 19:23:36 -0800
committerGilbert Gonzales <gilbert@lindenlab.com>2012-12-04 19:23:36 -0800
commit8642088d65ec340b50661e2a3bf74820ec595010 (patch)
tree152b0e28fbc3b57463514651eda0ed05af20c83a /indra/newview/llimview.cpp
parent3f6f374c2566c85e1a9480da674bfc2172dd9162 (diff)
CHUI-571: Fixed bug where when the converation floater was torn off and a new im received, the incorrect conversation would be displayed and focused. In order to do this removed the conversation floater panels from being focused immediately when set visible. Also there was a bug when showing the stub panel for torn off conversations. The tab container was not setting the stub panel index properly to 0, which is where the stub panel existed in the tab container's list. This is post code review submit. Will submit another with minor code review changes.
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r--indra/newview/llimview.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index b6fd3ec9c8..821e62c4e6 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -192,12 +192,24 @@ void on_new_message(const LLSD& msg)
else if("openconversations" == action)
{
LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
- if (im_box)
+ LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
+
+ //Don't flash and show conversation floater when conversation already active (has focus)
+ if(session_floater
+ && (!session_floater->isInVisibleChain()) //conversation floater not displayed
+ ||
+ (session_floater->isInVisibleChain() && session_floater->hasFocus() == false)) //conversation floater is displayed but doesn't have focus
+
{
- im_box->flashConversationItemWidget(session_id, true); // flashing of the conversation's item
+ //Flash line item
+ if (im_box)
+ {
+ im_box->flashConversationItemWidget(session_id, true); // flashing of the conversation's item
+ }
+
+ //Surface conversations floater
+ LLFloaterReg::showInstance("im_container");
}
-
- LLFloaterReg::showInstance("im_container");
}
}