summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-02-27 17:43:16 -0800
committerTodd Stinson <stinson@lindenlab.com>2012-02-27 17:43:16 -0800
commit10ab7acd3a9f62c0dfd2c91990f528ae3598010a (patch)
tree13bd5899d54d6be5745d88cc7b48c5644bd720ba /indra
parente86547d6248c50bdf3e962c82c38dc3612b31d54 (diff)
PATH-292: Ensuring that the terrain linkset use is clearly called out as unmodifiable.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterpathfindinglinksets.cpp39
-rw-r--r--indra/newview/llfloaterpathfindinglinksets.h3
-rw-r--r--indra/newview/llpathfindinglinkset.cpp12
-rw-r--r--indra/newview/llpathfindinglinkset.h4
-rw-r--r--indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml3
5 files changed, 42 insertions, 19 deletions
diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp
index 17ac1bd052..9b86ecd66a 100644
--- a/indra/newview/llfloaterpathfindinglinksets.cpp
+++ b/indra/newview/llfloaterpathfindinglinksets.cpp
@@ -642,6 +642,14 @@ void LLFloaterPathfindingLinksets::updateEditFieldValues()
mEditLinksetUseExclusionVolume->setEnabled(TRUE);
mEditLinksetUseDynamicPhantom->setEnabled(TRUE);
break;
+ case kAllowLinksetUseOnlyTerrain :
+ mEditLinksetUseWalkable->setEnabled(TRUE);
+ mEditLinksetUseStaticObstacle->setEnabled(FALSE);
+ mEditLinksetUseDynamicObstacle->setEnabled(FALSE);
+ mEditLinksetUseMaterialVolume->setEnabled(FALSE);
+ mEditLinksetUseExclusionVolume->setEnabled(FALSE);
+ mEditLinksetUseDynamicPhantom->setEnabled(FALSE);
+ break;
default :
llassert(0);
break;
@@ -759,9 +767,13 @@ LLSD LLFloaterPathfindingLinksets::buildLinksetScrollListElement(const LLPathfin
columns[4]["column"] = "linkset_use";
std::string linksetUse = getLinksetUseString(pLinksetPtr->getLinksetUse());
- if (pLinksetPtr->isLocked())
+ if (pLinksetPtr->isTerrain())
{
- linksetUse += (" " + getString("linkset_is_locked_state"));
+ linksetUse += (" " + getString("linkset_is_terrain"));
+ }
+ else if (!pLinksetPtr->isModifiable())
+ {
+ linksetUse += (" " + getString("linkset_is_restricted_state"));
}
columns[4]["value"] = linksetUse;
columns[4]["font"] = "SANSSERIF";
@@ -815,6 +827,7 @@ LLFloaterPathfindingLinksets::EAllowLinksetsUse LLFloaterPathfindingLinksets::ge
bool isAllLocked = true;
bool isAllPhantom = true;
bool isAllNonPhantom = true;
+ bool isAllTerrain = true;
for (std::vector<LLScrollListItem*>::const_iterator selectedItemIter = selectedItems.begin();
(isAllLocked || isAllPhantom || isAllNonPhantom) && (selectedItemIter != selectedItems.end()); ++selectedItemIter)
@@ -824,7 +837,11 @@ LLFloaterPathfindingLinksets::EAllowLinksetsUse LLFloaterPathfindingLinksets::ge
LLPathfindingLinksetList::const_iterator linksetIter = mLinksetsListPtr->find(selectedItem->getUUID().asString());
llassert(linksetIter != mLinksetsListPtr->end());
const LLPathfindingLinksetPtr linksetPtr = linksetIter->second;
- if (linksetPtr->isLocked())
+ if (!linksetPtr->isTerrain())
+ {
+ isAllTerrain = false;
+ }
+ if (!linksetPtr->isModifiable())
{
if (linksetPtr->isPhantom())
{
@@ -841,7 +858,11 @@ LLFloaterPathfindingLinksets::EAllowLinksetsUse LLFloaterPathfindingLinksets::ge
}
}
- if (isAllLocked)
+ if (isAllTerrain)
+ {
+ allowLinksetUse = kAllowLinksetUseOnlyTerrain;
+ }
+ else if (isAllLocked)
{
if (isAllPhantom && !isAllNonPhantom)
{
@@ -874,7 +895,7 @@ bool LLFloaterPathfindingLinksets::doShowLinksetUseSetWarning(LLPathfindingLinks
LLPathfindingLinksetList::const_iterator linksetIter = mLinksetsListPtr->find(selectedItem->getUUID().asString());
llassert(linksetIter != mLinksetsListPtr->end());
const LLPathfindingLinksetPtr linksetPtr = linksetIter->second;
- showWarning = (linksetPtr->isLocked() && (linksetPtr->isPhantom() != LLPathfindingLinkset::isPhantom(linksetUse)));
+ showWarning = (!linksetPtr->isModifiable() && (linksetPtr->isPhantom() != LLPathfindingLinkset::isPhantom(linksetUse)));
}
}
}
@@ -1024,10 +1045,10 @@ void LLFloaterPathfindingLinksets::applyEdit()
void LLFloaterPathfindingLinksets::handleApplyEdit(const LLSD &pNotification, const LLSD &pResponse)
{
- if (LLNotificationsUtil::getSelectedOption(pNotification, pResponse) == 0)
- {
- doApplyEdit();
- }
+ if (LLNotificationsUtil::getSelectedOption(pNotification, pResponse) == 0)
+ {
+ doApplyEdit();
+ }
}
void LLFloaterPathfindingLinksets::doApplyEdit()
diff --git a/indra/newview/llfloaterpathfindinglinksets.h b/indra/newview/llfloaterpathfindinglinksets.h
index b6e5ca8329..6432652568 100644
--- a/indra/newview/llfloaterpathfindinglinksets.h
+++ b/indra/newview/llfloaterpathfindinglinksets.h
@@ -79,7 +79,8 @@ private:
{
kAllowLinksetUseAll,
kAllowLinksetUseOnlyNonPhantom,
- kAllowLinksetUseOnlyPhantom
+ kAllowLinksetUseOnlyPhantom,
+ kAllowLinksetUseOnlyTerrain
} EAllowLinksetsUse;
LLLineEditor *mFilterByName;
diff --git a/indra/newview/llpathfindinglinkset.cpp b/indra/newview/llpathfindinglinkset.cpp
index 33c66ff764..1578494241 100644
--- a/indra/newview/llpathfindinglinkset.cpp
+++ b/indra/newview/llpathfindinglinkset.cpp
@@ -58,7 +58,7 @@ LLPathfindingLinkset::LLPathfindingLinkset(const LLSD& pTerrainLinksetItem)
mDescription(),
mLandImpact(0U),
mLocation(LLVector3::zero),
- mIsLocked(TRUE),
+ mIsModifiable(TRUE),
mLinksetUse(kUnknown),
mWalkabilityCoefficientA(MIN_WALKABILITY_VALUE),
mWalkabilityCoefficientB(MIN_WALKABILITY_VALUE),
@@ -75,7 +75,7 @@ LLPathfindingLinkset::LLPathfindingLinkset(const std::string &pUUID, const LLSD&
mDescription(),
mLandImpact(0U),
mLocation(LLVector3::zero),
- mIsLocked(FALSE),
+ mIsModifiable(TRUE),
mLinksetUse(kUnknown),
mWalkabilityCoefficientA(MIN_WALKABILITY_VALUE),
mWalkabilityCoefficientB(MIN_WALKABILITY_VALUE),
@@ -92,7 +92,7 @@ LLPathfindingLinkset::LLPathfindingLinkset(const LLPathfindingLinkset& pOther)
mDescription(pOther.mDescription),
mLandImpact(pOther.mLandImpact),
mLocation(pOther.mLocation),
- mIsLocked(pOther.mIsLocked),
+ mIsModifiable(pOther.mIsModifiable),
mLinksetUse(pOther.mLinksetUse),
mWalkabilityCoefficientA(pOther.mWalkabilityCoefficientA),
mWalkabilityCoefficientB(pOther.mWalkabilityCoefficientB),
@@ -112,7 +112,7 @@ LLPathfindingLinkset& LLPathfindingLinkset::operator =(const LLPathfindingLinkse
mDescription = pOther.mDescription;
mLandImpact = pOther.mLandImpact;
mLocation = pOther.mLocation;
- mIsLocked = pOther.mIsLocked;
+ mIsModifiable = pOther.mIsModifiable;
mLinksetUse = pOther.mLinksetUse;
mWalkabilityCoefficientA = pOther.mWalkabilityCoefficientA;
mWalkabilityCoefficientB = pOther.mWalkabilityCoefficientB;
@@ -168,7 +168,7 @@ LLSD LLPathfindingLinkset::encodeAlteredFields(ELinksetUse pLinksetUse, S32 pA,
if (!isTerrain() && (pLinksetUse != kUnknown) && (mLinksetUse != pLinksetUse))
{
- if (!mIsLocked)
+ if (mIsModifiable)
{
itemData[LINKSET_PHANTOM_FIELD] = static_cast<bool>(LLPathfindingLinkset::isPhantom(pLinksetUse));
}
@@ -216,7 +216,7 @@ void LLPathfindingLinkset::parseObjectData(const LLSD &pLinksetItem)
llassert(pLinksetItem.has(LINKSET_MODIFIABLE_FIELD));
llassert(pLinksetItem.get(LINKSET_MODIFIABLE_FIELD).isBoolean());
- mIsLocked = !pLinksetItem.get(LINKSET_MODIFIABLE_FIELD).asBoolean();
+ mIsModifiable = pLinksetItem.get(LINKSET_MODIFIABLE_FIELD).asBoolean();
llassert(pLinksetItem.has(LINKSET_POSITION_FIELD));
llassert(pLinksetItem.get(LINKSET_POSITION_FIELD).isArray());
diff --git a/indra/newview/llpathfindinglinkset.h b/indra/newview/llpathfindinglinkset.h
index a9b389b484..81acad7d4d 100644
--- a/indra/newview/llpathfindinglinkset.h
+++ b/indra/newview/llpathfindinglinkset.h
@@ -65,7 +65,7 @@ public:
inline const std::string& getDescription() const {return mDescription;};
inline U32 getLandImpact() const {return mLandImpact;};
inline const LLVector3& getLocation() const {return mLocation;};
- BOOL isLocked() const {return mIsLocked;};
+ BOOL isModifiable() const {return mIsModifiable;};
BOOL isPhantom() const;
static BOOL isPhantom(ELinksetUse pLinksetUse);
static ELinksetUse getLinksetUseWithToggledPhantom(ELinksetUse pLinksetUse);
@@ -97,7 +97,7 @@ private:
std::string mDescription;
U32 mLandImpact;
LLVector3 mLocation;
- BOOL mIsLocked;
+ BOOL mIsModifiable;
ELinksetUse mLinksetUse;
S32 mWalkabilityCoefficientA;
S32 mWalkabilityCoefficientB;
diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
index e8cfcd30a6..15583ea0c3 100644
--- a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
+++ b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml
@@ -32,7 +32,8 @@
<floater.string name="linkset_use_material_volume">Material volume</floater.string>
<floater.string name="linkset_use_exclusion_volume">Exclusion volume</floater.string>
<floater.string name="linkset_use_dynamic_phantom">Dynamic phantom</floater.string>
- <floater.string name="linkset_is_locked_state">[restricted]</floater.string>
+ <floater.string name="linkset_is_terrain">[unmodifiable]</floater.string>
+ <floater.string name="linkset_is_restricted_state">[restricted]</floater.string>
<floater.string name="linkset_choose_use">Choose linkset use...</floater.string>
<panel
border="false"