diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-03-07 19:41:49 -0800 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-03-07 19:41:49 -0800 |
commit | 63e8bb875b6aa3ae7789ee01497b848e9090e435 (patch) | |
tree | af98eabeca2b9984af41ad7176d826ddebe4390a /indra | |
parent | 41e095deb8f40de24c26ef10dda03951566e03c6 (diff) |
Adding an enabled check for the linksets menu item based on whether the state is frozen.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 11 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 92a01c22b3..06f9d931f8 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -110,6 +110,7 @@ #include "lleconomy.h" #include "lltoolgrab.h" #include "llwindow.h" +#include "llpathfindingmanager.h" #include "boost/unordered_map.hpp" using namespace LLVOAvatarDefines; @@ -4752,6 +4753,14 @@ class LLToolsSaveToObjectInventory : public view_listener_t } }; +class LLToolsEnableLinksets : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + return LLPathfindingManager::getInstance()->isAllowAlterPermanent(); + } +}; + // Round the position of all root objects to the grid class LLToolsSnapObjectXY : public view_listener_t { @@ -8144,6 +8153,8 @@ void initialize_menus() view_listener_t::addMenu(new LLToolsEnableSaveToInventory(), "Tools.EnableSaveToInventory"); view_listener_t::addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.EnableSaveToObjectInventory"); + view_listener_t::addMenu(new LLToolsEnableLinksets(), "Tools.EnableLinksets"); + // Help menu // most items use the ShowFloater method view_listener_t::addMenu(new LLToggleHowTo(), "Help.ToggleHowTo"); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 1e4a3fc13c..fb1709f28d 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -963,6 +963,8 @@ <menu_item_call.on_click function="Floater.ToggleOrBringToFront" parameter="pathfinding_linksets" /> + <menu_item_call.on_enable + function="Tools.EnableLinksets" /> </menu_item_call> <menu_item_call label="Characters..." |