From fd83378739003d23ce6a4bda3ca9e440f102079e Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Wed, 30 Dec 2020 18:02:30 -0500 Subject: [PATCH] Fix report and block options missing in various parts of people floater --- indra/newview/llpanelpeoplemenus.cpp | 9 +++++++-- indra/newview/llviewermenu.cpp | 10 +++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index d0abb8fef5b..bd2e49a2af8 100644 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -97,7 +97,7 @@ LLContextMenu* PeopleContextMenu::createMenu() case 2: ALAvatarActions::estateBan(id); break; } }); registrar.add("Avatar.TeleportTo", [&](LLUICtrl*, const LLSD&) { ALAvatarActions::teleportTo(id); }); - registrar.add("Avatar.ReportAbuse", [&](LLUICtrl*, const LLSD&) { LLFloaterReporter::showFromObject(id); }); + registrar.add("Avatar.ReportAbuse", [&](LLUICtrl*, const LLSD&) { ALAvatarActions::reportAbuse(id); }); enable_registrar.add("Avatar.EnableItem", boost::bind(&PeopleContextMenu::enableContextMenuItem, this, _2)); enable_registrar.add("Avatar.CheckItem", boost::bind(&PeopleContextMenu::checkContextMenuItem, this, _2)); @@ -176,8 +176,10 @@ void PeopleContextMenu::buildContextMenu(class LLMenuGL& menu, U32 flags) items.push_back(std::string("map")); items.push_back(std::string("share")); items.push_back(std::string("pay")); - items.push_back(std::string("block_unblock")); items.push_back(std::string("separator_utils")); + items.push_back(std::string("manage_menu")); + items.push_back(std::string("block_unblock")); + items.push_back(std::string("report_abuse")); items.push_back(std::string("utils_menu")); items.push_back(std::string("copy_username")); items.push_back(std::string("copy_display_name")); @@ -393,7 +395,10 @@ void NearbyPeopleContextMenu::buildContextMenu(class LLMenuGL& menu, U32 flags) items.push_back(std::string("request_teleport")); items.push_back(std::string("separator_invite_to_group")); items.push_back(std::string("zoom_in")); + items.push_back(std::string("separator_utils")); + items.push_back(std::string("manage_menu")); items.push_back(std::string("block_unblock")); + items.push_back(std::string("report_abuse")); } } else if (flags & ITEM_IN_MULTI_SELECTION) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 24bc6ba580a..5b4f24b5504 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3372,7 +3372,8 @@ class LLAvatarReportAbuse : public view_listener_t LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); if(avatar) { - LLFloaterReporter::showFromObject(avatar->getID()); + + ALAvatarActions::reportAbuse(avatar->getID()); } return true; } @@ -6303,12 +6304,7 @@ class LLAvatarResetSkeleton: public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLVOAvatar* avatar = NULL; - LLViewerObject *obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); - if (obj) - { - avatar = obj->getAvatar(); - } + LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); if(avatar) { avatar->resetSkeleton(false); -- GitLab