summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-01-03 14:37:24 -0800
committerMerov Linden <merov@lindenlab.com>2013-01-03 14:37:24 -0800
commit0e6ff3e7021b2e72f02b22550bbb96bc3674cba4 (patch)
treec608299bb9e1ba14385a1aa28efa2387172d013d /indra/newview
parent799c1f241f66db6d8701ee8c4339a5cce41c3c47 (diff)
CHUI-654 : Fixed! Select the Nearby Chat directly when one conversation only left, don't finesse with a root UUID that might not be NULL
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterimcontainer.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 50acd4ae24..9fe67e99da 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -1430,11 +1430,10 @@ bool LLFloaterIMContainer::removeConversationListItem(const LLUUID& uuid, bool c
{
is_widget_selected = widget->isSelected();
new_selection = mConversationsRoot->getNextFromChild(widget);
- if(new_selection == NULL)
+ if (!new_selection)
{
new_selection = mConversationsRoot->getPreviousFromChild(widget);
}
-
widget->destroyView();
}
@@ -1446,14 +1445,20 @@ bool LLFloaterIMContainer::removeConversationListItem(const LLUUID& uuid, bool c
if (change_focus)
{
setFocus(TRUE);
- if(new_selection != NULL)
+ if (new_selection)
{
if (mConversationsWidgets.size() == 1)
- new_selection = new_selection->getParentFolder();
- LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(new_selection->getViewModelItem());
- if(vmi != NULL)
{
- selectConversationPair(vmi->getUUID(), true);
+ // If only one widget is left, it has to be the Nearby Chat. Select it directly.
+ selectConversationPair(LLUUID(NULL), true);
+ }
+ else
+ {
+ LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(new_selection->getViewModelItem());
+ if (vmi)
+ {
+ selectConversationPair(vmi->getUUID(), true);
+ }
}
}
}