summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimcontainer.cpp
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2013-03-07 16:26:37 -0800
committerGilbert Gonzales <gilbert@lindenlab.com>2013-03-07 16:26:37 -0800
commit014376b49a1e6bf41fa8b0f1b36c0c02fca3096e (patch)
treeee1cb1bdc74a88a54e06ff709cb66e6f35b1c907 /indra/newview/llfloaterimcontainer.cpp
parentfe25f4bfb16c42236fb99a6a1a7bf28da3c2d7c6 (diff)
CHUI-832 (Different conversation than is selected shown in message panel after tearing off conversation): Now when a conversation is torn off an adjacent conversation is selected (but not focused).
Diffstat (limited to 'indra/newview/llfloaterimcontainer.cpp')
-rw-r--r--indra/newview/llfloaterimcontainer.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 5a37b5b57b..d67f2be658 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1912,7 +1912,19 @@ BOOL LLFloaterIMContainer::handleKeyHere(KEY key, MASK mask )
return TRUE;
}
-bool LLFloaterIMContainer::selectNextorPreviousConversation(bool select_next)
+bool LLFloaterIMContainer::selectAdjacentConversation(bool focus_selected)
+{
+ bool selectedAdjacentConversation = selectNextorPreviousConversation(true, focus_selected);
+
+ if(!selectedAdjacentConversation)
+ {
+ selectedAdjacentConversation = selectNextorPreviousConversation(false, focus_selected);
+ }
+
+ return selectedAdjacentConversation;
+}
+
+bool LLFloaterIMContainer::selectNextorPreviousConversation(bool select_next, bool focus_selected)
{
if (mConversationsWidgets.size() > 1)
{
@@ -1933,12 +1945,7 @@ bool LLFloaterIMContainer::selectNextorPreviousConversation(bool select_next)
LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(new_selection->getViewModelItem());
if (vmi)
{
- selectConversationPair(vmi->getUUID(), true);
- LLFloater* floaterp = get_ptr_in_map(mSessions, getSelectedSession());
- if(floaterp && !floaterp->isTornOff())
- {
- setFocus(TRUE);
- }
+ selectConversationPair(vmi->getUUID(), true, focus_selected);
return true;
}
}