PATH-706: Removing enforcement on frozen/unfrozen state from the linksets floater. Also, removing handlers for agent state change.

master
Todd Stinson 2012-06-11 14:45:59 -07:00
parent c352483f62
commit ff7223fafe
6 changed files with 3 additions and 51 deletions

View File

@ -60,26 +60,6 @@
// LLFloaterPathfindingLinksets
//---------------------------------------------------------------------------
void LLFloaterPathfindingLinksets::onOpen(const LLSD& pKey)
{
LLFloaterPathfindingObjects::onOpen(pKey);
if (!mAgentStateSlot.connected())
{
mAgentStateSlot = LLPathfindingManager::getInstance()->registerAgentStateListener(boost::bind(&LLFloaterPathfindingLinksets::onAgentStateChange, this, _1));
}
}
void LLFloaterPathfindingLinksets::onClose(bool pIsAppQuitting)
{
if (mAgentStateSlot.connected())
{
mAgentStateSlot.disconnect();
}
LLFloaterPathfindingObjects::onClose(pIsAppQuitting);
}
void LLFloaterPathfindingLinksets::openLinksetsEditor()
{
LLFloaterReg::toggleInstanceOrBringToFront("pathfinding_linksets");
@ -107,8 +87,7 @@ LLFloaterPathfindingLinksets::LLFloaterPathfindingLinksets(const LLSD& pSeed)
mLabelEditD(NULL),
mEditD(NULL),
mApplyEditsButton(NULL),
mBeaconColor(),
mAgentStateSlot()
mBeaconColor()
{
}
@ -337,11 +316,6 @@ void LLFloaterPathfindingLinksets::onApplyChangesClicked()
applyEdit();
}
void LLFloaterPathfindingLinksets::onAgentStateChange(LLPathfindingManager::EAgentState pAgentState)
{
updateControls();
}
void LLFloaterPathfindingLinksets::applyFilters()
{
rebuildObjectsScrollList();
@ -530,7 +504,7 @@ bool LLFloaterPathfindingLinksets::isShowCannotBeVolumeWarning(LLPathfindingLink
void LLFloaterPathfindingLinksets::updateStateOnEditFields()
{
int numSelectedItems = getNumSelectedObjects();
bool isEditEnabled = ((numSelectedItems > 0) && LLPathfindingManager::getInstance()->isAllowAlterPermanent());
bool isEditEnabled = (numSelectedItems > 0);
mEditLinksetUse->setEnabled(isEditEnabled);

View File

@ -46,10 +46,6 @@ class LLVector3;
class LLFloaterPathfindingLinksets : public LLFloaterPathfindingObjects
{
public:
virtual void onOpen(const LLSD& pKey);
virtual void onClose(bool pIsAppQuitting);
static void openLinksetsEditor();
protected:
@ -78,7 +74,6 @@ private:
void onClearFiltersClicked();
void onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl);
void onApplyChangesClicked();
void onAgentStateChange(LLPathfindingManager::EAgentState pAgentState);
void applyFilters();
void clearFilters();
@ -131,8 +126,6 @@ private:
LLButton *mApplyEditsButton;
LLColor4 mBeaconColor;
LLPathfindingManager::agent_state_slot_t mAgentStateSlot;
};
#endif // LL_LLFLOATERPATHFINDINGLINKSETS_H

View File

@ -292,11 +292,6 @@ bool LLPathfindingManager::isPathfindingNavMeshVersioningEnabledForCurrentRegion
}
#endif // DEPRECATED_UNVERSIONED_NAVMESH
bool LLPathfindingManager::isAllowAlterPermanent()
{
return (!isPathfindingEnabledForCurrentRegion() || (getAgentState() == kAgentStateUnfrozen));
}
bool LLPathfindingManager::isAllowViewTerrainProperties() const
{
LLViewerRegion* region = getCurrentRegion();

View File

@ -80,7 +80,6 @@ public:
bool isPathfindingNavMeshVersioningEnabledForCurrentRegionXXX() const;
#endif // DEPRECATED_UNVERSIONED_NAVMESH
bool isAllowAlterPermanent();
bool isAllowViewTerrainProperties() const;
LLPathfindingNavMesh::navmesh_slot_t registerNavMeshListenerForRegion(LLViewerRegion *pRegion, LLPathfindingNavMesh::navmesh_callback_t pNavMeshCallback);

View File

@ -4806,14 +4806,6 @@ class LLToolsEnablePathfinding : public view_listener_t
}
};
class LLToolsEnablePathfindingLinksets : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLPathfindingManager::getInstance()->isAllowAlterPermanent();
}
};
// Round the position of all root objects to the grid
class LLToolsSnapObjectXY : public view_listener_t
{
@ -8209,7 +8201,6 @@ void initialize_menus()
view_listener_t::addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.EnableSaveToObjectInventory");
view_listener_t::addMenu(new LLToolsEnablePathfinding(), "Tools.EnablePathfinding");
view_listener_t::addMenu(new LLToolsEnablePathfindingLinksets(), "Tools.EnablePathfindingLinksets");
// Help menu
// most items use the ShowFloater method

View File

@ -967,7 +967,7 @@
function="Floater.ToggleOrBringToFront"
parameter="pathfinding_linksets" />
<menu_item_call.on_enable
function="Tools.EnablePathfindingLinksets" />
function="Tools.EnablePathfinding" />
</menu_item_call>
<menu_item_call
label="Characters..."