PATH-718: Disabling the view/test menu in the case of a stubbed llphysicsextensions library.
parent
ce10117295
commit
c9fea8b43c
|
|
@ -311,6 +311,11 @@ void LLPathfindingManager::quitSystem()
|
|||
}
|
||||
}
|
||||
|
||||
bool LLPathfindingManager::isPathfindingViewEnabled() const
|
||||
{
|
||||
return (LLPathingLib::getInstance() != NULL);
|
||||
}
|
||||
|
||||
bool LLPathfindingManager::isPathfindingEnabledForCurrentRegion() const
|
||||
{
|
||||
return isPathfindingEnabledForRegion(getCurrentRegion());
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ public:
|
|||
void initSystem();
|
||||
void quitSystem();
|
||||
|
||||
bool isPathfindingViewEnabled() const;
|
||||
bool isPathfindingEnabledForCurrentRegion() const;
|
||||
bool isPathfindingEnabledForRegion(LLViewerRegion *pRegion) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -967,7 +967,7 @@
|
|||
function="Floater.ToggleOrBringToFront"
|
||||
parameter="pathfinding_console" />
|
||||
<menu_item_call.on_enable
|
||||
function="Tools.EnablePathfinding" />
|
||||
function="Tools.EnablePathfindingView" />
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue