diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-04-04 12:46:46 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-04-04 12:46:46 -0700 |
commit | 87fb36df1aa2bce666371f3d78f6c64b75e262b9 (patch) | |
tree | 3e028eab8fb36f60542beaba658f36442cc7b835 /indra/newview | |
parent | 081977308d6576f100df4bda03e6928faf520bc5 (diff) |
PATH-492: BUGFIX Disabling the pathfinding submenu options on non-pathfinding enabled regions.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 15 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 8 |
2 files changed, 19 insertions, 4 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index a8c6b6dcf5..2ed1975146 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -4801,11 +4801,19 @@ class LLToolsSaveToObjectInventory : public view_listener_t } }; -class LLToolsEnableLinksets : public view_listener_t +class LLToolsEnablePathfinding : public view_listener_t { bool handleEvent(const LLSD& userdata) { - return LLPathfindingManager::getInstance()->isAllowAlterPermanent(); + return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion(); + } +}; + +class LLToolsEnablePathfindingLinksets : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLPathfindingManager::getInstance()->isAllowAlterPermanent(); } }; @@ -8196,7 +8204,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"); + view_listener_t::addMenu(new LLToolsEnablePathfinding(), "Tools.EnablePathfinding"); + view_listener_t::addMenu(new LLToolsEnablePathfindingLinksets(), "Tools.EnablePathfindingLinksets"); // Help menu // most items use the ShowFloater method diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 492944cccb..ad02beff7a 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -948,6 +948,8 @@ <menu_item_call.on_click function="Floater.ToggleOrBringToFront" parameter="pathfinding_basic" /> + <menu_item_call.on_enable + function="Tools.EnablePathfinding" /> </menu_item_call> <menu_item_call label="Edit / test..." @@ -955,6 +957,8 @@ <menu_item_call.on_click function="Floater.ToggleOrBringToFront" parameter="pathfinding_console" /> + <menu_item_call.on_enable + function="Tools.EnablePathfinding" /> </menu_item_call> <menu_item_call label="Linksets..." @@ -963,7 +967,7 @@ function="Floater.ToggleOrBringToFront" parameter="pathfinding_linksets" /> <menu_item_call.on_enable - function="Tools.EnableLinksets" /> + function="Tools.EnablePathfindingLinksets" /> </menu_item_call> <menu_item_call label="Characters..." @@ -971,6 +975,8 @@ <menu_item_call.on_click function="Floater.ToggleOrBringToFront" parameter="pathfinding_characters" /> + <menu_item_call.on_enable + function="Tools.EnablePathfinding" /> </menu_item_call> </menu> |