From 94ac0064354594de8adbb99084029c8b4027b2f6 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 15 Oct 2014 19:34:13 +0300 Subject: MAINT-4576 FIXED Damage Icon always displays regardless of land setting. --- indra/newview/llfloaterland.cpp | 5 +++-- indra/newview/llviewerparcelmgr.cpp | 2 +- 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 -- cgit v1.2.3