summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Zaporozhan <dzaporozhan@productengine.com>2010-01-14 18:29:56 +0200
committerDmitry Zaporozhan <dzaporozhan@productengine.com>2010-01-14 18:29:56 +0200
commit84f6c7bc0453c1c9231fbe7ba88f47110187f7a9 (patch)
tree1a0052a7a4168985bf6869778f1dc9084ef43fac
parent1317cdbf8f691b229a12ad5fb9b6ae8dd477d587 (diff)
Fixed low bug EXT-4181 - IM window appears after double click on arrow button from Voice Control Panel.
--HG-- branch : product-engine
-rw-r--r--indra/newview/llparticipantlist.cpp13
-rw-r--r--indra/newview/llparticipantlist.h2
2 files changed, 10 insertions, 5 deletions
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index b6f78d08f1..0a180512ce 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -70,7 +70,7 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av
mSpeakerMgr->addListener(mSpeakerModeratorListener, "update_moderator");
mAvatarList->setNoItemsCommentText(LLTrans::getString("LoadingData"));
- mAvatarListDoubleClickConnection = mAvatarList->setDoubleClickCallback(boost::bind(&LLParticipantList::onAvatarListDoubleClicked, this, mAvatarList));
+ mAvatarListDoubleClickConnection = mAvatarList->setItemDoubleClickCallback(boost::bind(&LLParticipantList::onAvatarListDoubleClicked, this, _1));
mAvatarListRefreshConnection = mAvatarList->setRefreshCompleteCallback(boost::bind(&LLParticipantList::onAvatarListRefreshed, this, _1, _2));
// Set onAvatarListDoubleClicked as default on_return action.
mAvatarListReturnConnection = mAvatarList->setReturnCallback(boost::bind(&LLParticipantList::onAvatarListDoubleClicked, this, mAvatarList));
@@ -132,10 +132,15 @@ void LLParticipantList::setSpeakingIndicatorsVisible(BOOL visible)
mAvatarList->setSpeakingIndicatorsVisible(visible);
};
-void LLParticipantList::onAvatarListDoubleClicked(LLAvatarList* list)
+void LLParticipantList::onAvatarListDoubleClicked(LLUICtrl* ctrl)
{
- // NOTE(EM): Should we check if there is multiple selection and start conference if it is so?
- LLUUID clicked_id = list->getSelectedUUID();
+ LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(ctrl);
+ if(!item)
+ {
+ return;
+ }
+
+ LLUUID clicked_id = item->getAvatarId();
if (clicked_id.isNull() || clicked_id == gAgent.getID())
return;
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index 70badbc40d..e1b1b5af00 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -232,7 +232,7 @@ class LLParticipantList
};
private:
- void onAvatarListDoubleClicked(LLAvatarList* list);
+ void onAvatarListDoubleClicked(LLUICtrl* ctrl);
void onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param);
/**