CHUI-449: Got rid of a function called setItemSelect(), I wrote this code and it doesn't have a purpose anymore since I can use setConvItemSelect() instead. Also now torn off, minimized conversations are selected when clicking a toast for that conversation. Resolution: Adjusted setConvItemSelect() to be less strict when trying to select an item, now as long as the function is called it will attempt to select the conversation line item.
parent
b77e2f17aa
commit
63548b973e
|
|
@ -448,11 +448,9 @@ void LLConversationViewParticipant::selectItem()
|
|||
// Store the active session
|
||||
container->setSelectedSession(vmi->getUUID());
|
||||
}
|
||||
//Focus the current conversation floater (it is already visible so just focus it)
|
||||
else
|
||||
{
|
||||
session_floater->setFocus(TRUE);
|
||||
}
|
||||
|
||||
//Redirect focus to the conversation floater
|
||||
session_floater->setFocus(TRUE);
|
||||
}
|
||||
|
||||
LLFolderViewItem::selectItem();
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ void LLIMFloaterContainer::sessionAdded(const LLUUID& session_id, const std::str
|
|||
|
||||
void LLIMFloaterContainer::sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id)
|
||||
{
|
||||
setItemSelect(session_id);
|
||||
setConvItemSelect(session_id);
|
||||
}
|
||||
|
||||
void LLIMFloaterContainer::sessionVoiceOrIMStarted(const LLUUID& session_id)
|
||||
|
|
@ -1099,35 +1099,12 @@ void LLIMFloaterContainer::showConversation(const LLUUID& session_id)
|
|||
void LLIMFloaterContainer::setConvItemSelect(const LLUUID& session_id)
|
||||
{
|
||||
LLFolderViewItem* widget = mConversationsWidgets[session_id];
|
||||
if (widget && mSelectedSession != session_id)
|
||||
if (widget)
|
||||
{
|
||||
mSelectedSession = session_id;
|
||||
(widget->getRoot())->setSelection(widget, FALSE, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
//Will select the conversation/participant item
|
||||
void LLIMFloaterContainer::setItemSelect(const LLUUID& session_id)
|
||||
{
|
||||
|
||||
if(mConversationsRoot->getCurSelectedItem() && mConversationsRoot->getCurSelectedItem()->getParentFolder())
|
||||
{
|
||||
//Retreive the conversation id. When a participant is selected, then have to to get the converation id from the parent.
|
||||
LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(mConversationsRoot->getCurSelectedItem()->getParentFolder()->getViewModelItem());
|
||||
|
||||
//Will allow selection/highlighting of the conversation/participant
|
||||
if(session_id != vmi->getUUID())
|
||||
{
|
||||
mSelectedSession = session_id;
|
||||
LLFolderViewItem* widget = mConversationsWidgets[session_id];
|
||||
(widget->getRoot())->setSelection(widget, FALSE, FALSE);
|
||||
|
||||
// Scroll to selected item
|
||||
mConversationsRoot->scrollToShowSelection();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLIMFloaterContainer::setTimeNow(const LLUUID& session_id, const LLUUID& participant_id)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ public:
|
|||
|
||||
void showConversation(const LLUUID& session_id);
|
||||
void setConvItemSelect(const LLUUID& session_id);
|
||||
void setItemSelect(const LLUUID& session_id);
|
||||
/*virtual*/ void tabClose();
|
||||
|
||||
static LLFloater* getCurrentVoiceFloater();
|
||||
|
|
|
|||
Loading…
Reference in New Issue