summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2014-10-15 19:34:13 +0300
committerandreykproductengine <akleshchev@productengine.com>2014-10-15 19:34:13 +0300
commit94ac0064354594de8adbb99084029c8b4027b2f6 (patch)
tree5b4606736e20c7f7efa09cb88831ad9a13a90daf /indra/newview
parent99bf150059fea3f0856e376fba66e5f9d6a4abe7 (diff)
MAINT-4576 FIXED Damage Icon always displays regardless of land setting.
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llfloaterland.cpp5
-rwxr-xr-xindra/newview/llviewerparcelmgr.cpp2
2 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 7621c35ed2..3cef7958c2 100755
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -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)
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 2f4365036c..d574dec11d 100755
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -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