PATH-292: Ensuring that the terrain linkset use is clearly called out as unmodifiable.
parent
e86547d624
commit
10ab7acd3a
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -79,7 +79,8 @@ private:
|
|||
{
|
||||
kAllowLinksetUseAll,
|
||||
kAllowLinksetUseOnlyNonPhantom,
|
||||
kAllowLinksetUseOnlyPhantom
|
||||
kAllowLinksetUseOnlyPhantom,
|
||||
kAllowLinksetUseOnlyTerrain
|
||||
} EAllowLinksetsUse;
|
||||
|
||||
LLLineEditor *mFilterByName;
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue