CHUI-388 FIXED Do not add menu items to Participant Menu if own avatar is selected in participant list. Do not show Menu if all menu items are disabled.
parent
d0f9600f37
commit
5a22949cf5
|
|
@ -3037,7 +3037,17 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y)
|
|||
const S32 CURSOR_HEIGHT = 22; // Approximate "normal" cursor size
|
||||
const S32 CURSOR_WIDTH = 12;
|
||||
|
||||
if(menu->getChildList()->empty())
|
||||
//Do not show menu if all menu items are disabled
|
||||
BOOL item_enabled = false;
|
||||
for (LLView::child_list_t::const_iterator itor = menu->getChildList()->begin();
|
||||
itor != menu->getChildList()->end();
|
||||
++itor)
|
||||
{
|
||||
LLView *menu_item = (*itor);
|
||||
item_enabled = item_enabled || menu_item->getEnabled();
|
||||
}
|
||||
|
||||
if(menu->getChildList()->empty() || !item_enabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llavataractions.h"
|
||||
#include "llevents.h"
|
||||
|
|
@ -374,7 +375,10 @@ void LLConversationItemParticipant::buildContextMenu(LLMenuGL& menu, U32 flags)
|
|||
menuentry_vec_t items;
|
||||
menuentry_vec_t disabled_items;
|
||||
|
||||
buildParticipantMenuOptions(items);
|
||||
if(gAgent.getID() != mUUID)
|
||||
{
|
||||
buildParticipantMenuOptions(items);
|
||||
}
|
||||
hide_context_entries(menu, items, disabled_items);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue