From ae24afec8fc9fc357b25e2ff36fd040a68f8f163 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 22 May 2020 14:37:14 +0300 Subject: SL-13190 Allow Edit Attached Object Position From Inventory --- indra/newview/llviewermenu.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index b6c7be2ed3..b388d6a1bd 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2777,7 +2777,6 @@ class LLObjectBuild : public view_listener_t } }; - void handle_object_edit() { LLViewerParcelMgr::getInstance()->deselectLand(); @@ -2822,6 +2821,20 @@ void handle_object_edit() return; } +void handle_attachment_edit(const LLUUID& inv_item_id) +{ + if (isAgentAvatarValid()) + { + if (LLViewerObject* attached_obj = gAgentAvatarp->getWornAttachment(inv_item_id)) + { + LLSelectMgr::getInstance()->deselectAll(); + LLSelectMgr::getInstance()->selectObjectAndFamily(attached_obj); + + handle_object_edit(); + } + } +} + void handle_object_inspect() { LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); -- cgit v1.2.3 From 5a44656a2687de2f495708134308228d28a69971 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 28 May 2020 16:19:53 +0300 Subject: SL-13337 Remove teen account limitations concerning undergarments --- indra/newview/llviewermenu.cpp | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index b388d6a1bd..e9d23ea16d 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -375,20 +375,6 @@ void initialize_menus(); // Break up groups of more than 6 items with separators //----------------------------------------------------------------------------- -void set_underclothes_menu_options() -{ - if (gMenuHolder && gAgent.isTeen()) - { - gMenuHolder->getChild("Self Underpants")->setVisible(FALSE); - gMenuHolder->getChild("Self Undershirt")->setVisible(FALSE); - } - if (gMenuBarView && gAgent.isTeen()) - { - gMenuBarView->getChild("Menu Underpants")->setVisible(FALSE); - gMenuBarView->getChild("Menu Undershirt")->setVisible(FALSE); - } -} - void set_merchant_SLM_menu() { // All other cases (new merchant, not merchant, migrated merchant): show the new Marketplace Listings menu and enable the tool -- cgit v1.2.3 From 353afb48f265822f591eb8d02cacd830e32640bf Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 28 May 2020 18:38:01 +0300 Subject: SL-13239 Add 'Touch' to the various attachment context menus --- indra/newview/llviewermenu.cpp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index e9d23ea16d..be018a1a4d 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2821,6 +2821,43 @@ void handle_attachment_edit(const LLUUID& inv_item_id) } } +void handle_attachment_touch(const LLUUID& inv_item_id) +{ + if ( (isAgentAvatarValid()) && (enable_attachment_touch(inv_item_id)) ) + { + if (LLViewerObject* attach_obj = gAgentAvatarp->getWornAttachment(gInventory.getLinkedItemID(inv_item_id))) + { + LLSelectMgr::getInstance()->deselectAll(); + + LLObjectSelectionHandle sel = LLSelectMgr::getInstance()->selectObjectAndFamily(attach_obj); + if (!LLToolMgr::getInstance()->inBuildMode()) + { + struct SetTransient : public LLSelectedNodeFunctor + { + bool apply(LLSelectNode* node) + { + node->setTransient(TRUE); + return true; + } + } f; + sel->applyToNodes(&f); + } + + handle_object_touch(); + } + } +} + +bool enable_attachment_touch(const LLUUID& inv_item_id) +{ + if (isAgentAvatarValid()) + { + const LLViewerObject* attach_obj = gAgentAvatarp->getWornAttachment(gInventory.getLinkedItemID(inv_item_id)); + return (attach_obj) && (attach_obj->flagHandleTouch()); + } + return false; +} + void handle_object_inspect() { LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); -- cgit v1.2.3