diff --git a/indra/newview/alviewermenu.cpp b/indra/newview/alviewermenu.cpp index 333af8e8bc87fe40165d12ece8d3b04ec1f34791..23018b8f867e243035ff2cb7873fbca5c06a3fe8 100644 --- a/indra/newview/alviewermenu.cpp +++ b/indra/newview/alviewermenu.cpp @@ -227,7 +227,11 @@ namespace return true; } - bool is_powerful_wizard() + bool is_powerful_wizard() { + return gSavedSettings.getBOOL("AlchemyPowerfulWizard"); + } + + bool is_powerful_wizard_object() { LLViewerObject* objpos = LLSelectMgr::getInstanceFast()->getSelection()->getFirstRootObject(); if (objpos) @@ -324,7 +328,8 @@ namespace void ALViewerMenu::initialize_menus() { LLUICtrl::EnableCallbackRegistry::Registrar& enable = LLUICtrl::EnableCallbackRegistry::currentRegistrar(); - enable.add("Alchemy.PowerfulWizard", [](LLUICtrl* ctrl, const LLSD& param) { return is_powerful_wizard(); }); + enable.add("Alchemy.PowerfulWizard", [](LLUICtrl* ctrl, const LLSD& param) { return is_powerful_wizard(); }); + enable.add("Alchemy.PowerfulWizardObject", [](LLUICtrl* ctrl, const LLSD& param) { return is_powerful_wizard_object(); }); enable.add("Avatar.EnableManageEstate", [](LLUICtrl* ctrl, const LLSD& param) { return can_manage_avatar_estate(); }); enable.add("Avatar.EnableTeleportTo", [](LLUICtrl* ctrl, const LLSD& param) { return can_teleport_to(); }); enable.add("Object.EnableEditParticles", [](LLUICtrl* ctrl, const LLSD& param) { return enable_edit_particle_source(); }); diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index d39e201c0c1f04c245d3da078e2288f2db50c5d1..120ed7615564fd41037cb83a8ac604914e46143e 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -666,6 +666,16 @@ <menu_item_separator layout="topleft" name="Paste Separator" /> + <menu_item_call + label="Restore to Last Position" + layout="topleft" + name="Restore to Last Position"> + <menu_item_call.on_click + function="Inventory.DoToSelected" + parameter="restoreToWorld" /> + <menu_item_call.on_enable + function="Alchemy.PowerfulWizard" /> + </menu_item_call> <menu_item_call label="Delete" layout="topleft" @@ -827,16 +837,6 @@ layout="topleft" name="Wearable And Object Separator"/> <menu_item_call - label="Restore to Last Position" - layout="topleft" - name="Restore to Last Position"> - <menu_item_call.on_click - function="Inventory.DoToSelected" - parameter="restoreToWorld" /> - <menu_item_call.on_enable - function="Alchemy.PowerfulWizard" /> - </menu_item_call> - <menu_item_call label="Wear" layout="topleft" name="Wearable And Object Wear"> diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml index c791acca18cef34028471a2dfbcddca9ef46758b..1530a59caaff9311100166098b5ae39b61622b21 100644 --- a/indra/newview/skins/default/xui/en/menu_object.xml +++ b/indra/newview/skins/default/xui/en/menu_object.xml @@ -102,9 +102,7 @@ <menu_item_call.on_click function="Object.AlchemyExplode" /> <menu_item_call.on_enable - function="Alchemy.PowerfulWizard" /> - <menu_item_call.on_visible - function="Alchemy.PowerfulWizard" /> + function="Alchemy.PowerfulWizardObject" /> </menu_item_call> <menu_item_call label="Destroy" @@ -112,9 +110,7 @@ <menu_item_call.on_click function="Object.AlchemyDestroy" /> <menu_item_call.on_enable - function="Alchemy.PowerfulWizard" /> - <menu_item_call.on_visible - function="Alchemy.PowerfulWizard" /> + function="Alchemy.PowerfulWizardObject" /> </menu_item_call> <menu_item_call label="Force Delete" @@ -122,9 +118,7 @@ <menu_item_call.on_click function="Object.AlchemyForceDelete" /> <menu_item_call.on_enable - function="Alchemy.PowerfulWizard" /> - <menu_item_call.on_visible - function="Alchemy.PowerfulWizard" /> + function="Alchemy.PowerfulWizardObject" /> </menu_item_call> </context_menu> <menu_item_call