MAINT-4576 FIXED Damage Icon always displays regardless of land setting.

andreykproductengine 2014-10-15 19:34:13 +03:00
parent 99bf150059
commit 94ac006435
2 changed files with 4 additions and 3 deletions

View File

@ -1983,6 +1983,7 @@ void LLPanelLandOptions::refresh()
else
{
// something selected, hooray!
LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion();
// Display options
BOOL can_change_options = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS);
@ -1998,8 +1999,9 @@ void LLPanelLandOptions::refresh()
mCheckGroupObjectEntry ->set( parcel->getAllowGroupObjectEntry() || parcel->getAllowAllObjectEntry());
mCheckGroupObjectEntry ->setEnabled( can_change_options && !parcel->getAllowAllObjectEntry() );
BOOL region_damage = regionp ? regionp->getAllowDamage() : FALSE;
mCheckSafe ->set( !parcel->getAllowDamage() );
mCheckSafe ->setEnabled( can_change_options );
mCheckSafe ->setEnabled( can_change_options && region_damage );
mCheckFly ->set( parcel->getAllowFly() );
mCheckFly ->setEnabled( can_change_options );
@ -2079,7 +2081,6 @@ void LLPanelLandOptions::refresh()
// they can see the checkbox, but its disposition depends on the
// state of the region
LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion();
if (regionp)
{
if (regionp->getSimAccess() == SIM_ACCESS_PG)

View File

@ -705,7 +705,7 @@ bool LLViewerParcelMgr::allowAgentScripts(const LLViewerRegion* region, const LL
bool LLViewerParcelMgr::allowAgentDamage(const LLViewerRegion* region, const LLParcel* parcel) const
{
return (region && region->getAllowDamage())
|| (parcel && parcel->getAllowDamage());
&& (parcel && parcel->getAllowDamage());
}
BOOL LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const