summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterimcontainer.cpp20
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp12
-rw-r--r--indra/newview/llfloaterimsessiontab.h1
3 files changed, 26 insertions, 7 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 23c21d5309..b8a37da3fa 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -870,8 +870,16 @@ const LLConversationItem * LLFloaterIMContainer::getCurSelectedViewModelItem()
mConversationsRoot->getCurSelectedItem() &&
mConversationsRoot->getCurSelectedItem()->getViewModelItem())
{
- conversationItem = static_cast<LLConversationItem *>(mConversationsRoot->getCurSelectedItem()->getViewModelItem());
- }
+ LLFloaterIMSessionTab *selectedSession = LLFloaterIMSessionTab::getConversation(mSelectedSession);
+ if (selectedSession && selectedSession->isTornOff())
+ {
+ conversationItem = selectedSession->getCurSelectedViewModelItem();
+ }
+ else
+ {
+ conversationItem = static_cast<LLConversationItem *>(mConversationsRoot->getCurSelectedItem()->getViewModelItem());
+ }
+ }
return conversationItem;
}
@@ -1560,21 +1568,19 @@ void LLFloaterIMContainer::moderateVoiceParticipant(const LLUUID& avatar_id, boo
LLSpeakerMgr * LLFloaterIMContainer::getSpeakerMgrForSelectedParticipant()
{
- LLFolderViewItem * selected_folder_itemp = mConversationsRoot->getCurSelectedItem();
- if (NULL == selected_folder_itemp)
+ LLFolderViewItem *selectedItem = mConversationsRoot->getCurSelectedItem();
+ if (NULL == selectedItem)
{
llwarns << "Current selected item is null" << llendl;
return NULL;
}
- LLFolderViewFolder * conversation_itemp = selected_folder_itemp->getParentFolder();
-
conversations_widgets_map::const_iterator iter = mConversationsWidgets.begin();
conversations_widgets_map::const_iterator end = mConversationsWidgets.end();
const LLUUID * conversation_uuidp = NULL;
while(iter != end)
{
- if (iter->second == conversation_itemp)
+ if (iter->second == selectedItem || iter->second == selectedItem->getParentFolder())
{
conversation_uuidp = &iter->first;
break;
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index da25f95ffe..b50b8c2d32 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -831,4 +831,16 @@ void LLFloaterIMSessionTab::getSelectedUUIDs(uuid_vec_t& selected_uuids)
}
}
+LLConversationItem* LLFloaterIMSessionTab::getCurSelectedViewModelItem()
+{
+ LLConversationItem *conversationItem = NULL;
+ if(mConversationsRoot &&
+ mConversationsRoot->getCurSelectedItem() &&
+ mConversationsRoot->getCurSelectedItem()->getViewModelItem())
+ {
+ conversationItem = static_cast<LLConversationItem *>(mConversationsRoot->getCurSelectedItem()->getViewModelItem()) ;
+ }
+
+ return conversationItem;
+}
diff --git a/indra/newview/llfloaterimsessiontab.h b/indra/newview/llfloaterimsessiontab.h
index 8efa0955fc..4851904074 100644
--- a/indra/newview/llfloaterimsessiontab.h
+++ b/indra/newview/llfloaterimsessiontab.h
@@ -94,6 +94,7 @@ public:
virtual void onTearOffClicked();
virtual void updateMessages() {}
+ LLConversationItem* getCurSelectedViewModelItem();
protected: