summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-06-25 18:17:56 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-06-25 18:17:56 -0700
commitc9fea8b43cfb50d1e8406ea87f47c51daea7cef1 (patch)
tree70c3ddfad433c1c945d5b718d80c1c9869af9da8 /indra/newview/llviewermenu.cpp
parentce101172954c9cbc9a089d8796643d545bdee9d5 (diff)
PATH-718: Disabling the view/test menu in the case of a stubbed llphysicsextensions library.
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 47cafeb3f8..bcec9c6eda 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -4886,6 +4886,14 @@ class LLToolsEnablePathfinding : public view_listener_t
}
};
+class LLToolsEnablePathfindingView : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ return (LLPathfindingManager::getInstance() != NULL) && LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLPathfindingManager::getInstance()->isPathfindingViewEnabled();
+ }
+};
+
// Round the position of all root objects to the grid
class LLToolsSnapObjectXY : public view_listener_t
{
@@ -8281,6 +8289,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.EnableSaveToObjectInventory");
view_listener_t::addMenu(new LLToolsEnablePathfinding(), "Tools.EnablePathfinding");
+ view_listener_t::addMenu(new LLToolsEnablePathfindingView(), "Tools.EnablePathfindingView");
// Help menu
// most items use the ShowFloater method