SL-17036 update menu item similar to NavMesh icon

master
Mnikolenko Productengine 2022-03-25 18:48:44 +02:00
parent d11df20601
commit 3f0a0051ba
4 changed files with 14 additions and 6 deletions

View File

@ -109,6 +109,8 @@ public:
LLLineEditor* getTextEntry() const { return mTextEntry; }
void handleLoginComplete();
bool isNavMeshDirty() { return mIsNavMeshDirty; }
private:
enum EParcelIcon

View File

@ -733,3 +733,8 @@ int LLNavigationBar::getDefFavBarHeight()
{
return mDefaultFpRect.getHeight();
}
bool LLNavigationBar::isRebakeNavMeshAvailable()
{
return mCmbLocation->isNavMeshDirty();
}

View File

@ -102,6 +102,8 @@ public:
int getDefNavBarHeight();
int getDefFavBarHeight();
bool isRebakeNavMeshAvailable();
private:
// the distance between navigation panel and favorites panel in pixels

View File

@ -94,6 +94,7 @@
#include "llmarketplacefunctions.h"
#include "llmenuoptionpathfindingrebakenavmesh.h"
#include "llmoveview.h"
#include "llnavigationbar.h"
#include "llparcel.h"
#include "llrootview.h"
#include "llsceneview.h"
@ -5331,12 +5332,10 @@ class LLToolsEnablePathfindingRebakeRegion : public view_listener_t
{
bool returnValue = false;
if (LLPathfindingManager::getInstance() != NULL)
{
LLMenuOptionPathfindingRebakeNavmesh *rebakeInstance = LLMenuOptionPathfindingRebakeNavmesh::getInstance();
returnValue = (rebakeInstance->canRebakeRegion() &&
(rebakeInstance->getMode() == LLMenuOptionPathfindingRebakeNavmesh::kRebakeNavMesh_Available));
}
if (LLNavigationBar::instanceExists())
{
returnValue = LLNavigationBar::getInstance()->isRebakeNavMeshAvailable();
}
return returnValue;
}
};