CHUI-700 FIX [CHUIBUG]"Zoom in" feature for avatars has disappeared
Disabled "Zoom In" menu item in the case where gObjectList.findObject() returns nothing
parent
b6d973d313
commit
5cddf709ac
|
|
@ -53,6 +53,7 @@
|
|||
#include "llcallbacklist.h"
|
||||
#include "llworld.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
|
||||
//
|
||||
// LLFloaterIMContainer
|
||||
|
|
@ -1231,7 +1232,7 @@ bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_v
|
|||
}
|
||||
|
||||
// Handle all other options
|
||||
if (("can_invite" == item) || ("can_chat_history" == item) || ("can_share" == item) || ("can_pay" == item) || ("can_zoom_in" == item))
|
||||
if (("can_invite" == item) || ("can_chat_history" == item) || ("can_share" == item) || ("can_pay" == item))
|
||||
{
|
||||
// Those menu items are enable only if a single avatar is selected
|
||||
return is_single_select;
|
||||
|
|
@ -1261,6 +1262,10 @@ bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_v
|
|||
{
|
||||
return LLAvatarActions::canCall();
|
||||
}
|
||||
else if ("can_zoom_in" == item)
|
||||
{
|
||||
return is_single_select && gObjectList.findObject(single_id);
|
||||
}
|
||||
else if ("can_show_on_map" == item)
|
||||
{
|
||||
return (is_single_select ? (LLAvatarTracker::instance().isBuddyOnline(single_id) && is_agent_mappable(single_id)) || gAgent.isGodlike() : false);
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
#include "lllogchat.h"
|
||||
#include "llviewermenu.h" // for gMenuHolder
|
||||
#include "llconversationmodel.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
|
||||
namespace LLPanelPeopleMenus
|
||||
{
|
||||
|
|
@ -212,6 +213,12 @@ bool PeopleContextMenu::enableContextMenuItem(const LLSD& userdata)
|
|||
{
|
||||
return LLAvatarActions::canCall();
|
||||
}
|
||||
else if (item == std::string("can_zoom_in"))
|
||||
{
|
||||
const LLUUID& id = mUUIDs.front();
|
||||
|
||||
return gObjectList.findObject(id);
|
||||
}
|
||||
else if (item == std::string("can_show_on_map"))
|
||||
{
|
||||
const LLUUID& id = mUUIDs.front();
|
||||
|
|
@ -228,8 +235,7 @@ bool PeopleContextMenu::enableContextMenuItem(const LLSD& userdata)
|
|||
return LLLogChat::isTranscriptExist(mUUIDs.front());
|
||||
}
|
||||
else if (item == std::string("can_im") || item == std::string("can_invite") ||
|
||||
item == std::string("can_share") || item == std::string("can_pay") ||
|
||||
item == std::string("can_zoom_in"))
|
||||
item == std::string("can_share") || item == std::string("can_pay"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue