From acacee98c6e4398b0ea808f23333a31689966133 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 5 Apr 2011 22:15:06 +0100 Subject: properly refresh object owner list when refresh button is hit on land parcel object tab --- .../CoreModules/World/Land/LandManagementModule.cs | 17 +++++++++-------- OpenSim/Region/CoreModules/World/Land/LandObject.cs | 6 +++++- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index adfac05..abc7a3a 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -62,8 +62,7 @@ namespace OpenSim.Region.CoreModules.World.Land public class LandManagementModule : INonSharedRegionModule { - private static readonly ILog m_log = - LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly string remoteParcelRequestPath = "0009/"; @@ -307,8 +306,8 @@ namespace OpenSim.Region.CoreModules.World.Land /// The parcel created. protected ILandObject CreateDefaultParcel() { -// m_log.DebugFormat( -// "[LAND MANAGEMENT MODULE]: Creating default parcel for region {0}", m_scene.RegionInfo.RegionName); + m_log.DebugFormat( + "[LAND MANAGEMENT MODULE]: Creating default parcel for region {0}", m_scene.RegionInfo.RegionName); ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene); fullSimParcel.SetLandBitmap(fullSimParcel.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); @@ -778,7 +777,7 @@ namespace OpenSim.Region.CoreModules.World.Land #region Parcel Modification - public void ResetOverMeRecord() + public void ResetOverMeRecords() { lock (m_landList) { @@ -855,7 +854,7 @@ namespace OpenSim.Region.CoreModules.World.Land // "[LAND MANAGEMENT MODULE]: Triggered EventManagerOnParcelPrimCountUpdate() for {0}", // m_scene.RegionInfo.RegionName); - ResetOverMeRecord(); + ResetOverMeRecords(); EntityBase[] entities = m_scene.Entities.GetEntities(); foreach (EntityBase obj in entities) { @@ -872,7 +871,7 @@ namespace OpenSim.Region.CoreModules.World.Land public void EventManagerOnRequestParcelPrimCountUpdate() { - ResetOverMeRecord(); + ResetOverMeRecords(); m_scene.EventManager.TriggerParcelPrimCountUpdate(); FinalizeLandPrimCountUpdate(); } @@ -1193,6 +1192,7 @@ namespace OpenSim.Region.CoreModules.World.Land if (land != null) { + m_scene.EventManager.TriggerParcelPrimCountUpdate(); m_landList[local_id].SendLandObjectOwners(remote_client); } else @@ -1424,7 +1424,8 @@ namespace OpenSim.Region.CoreModules.World.Land private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps) { IClientAPI client; - if (! m_scene.TryGetClient(agentID, out client)) { + if (!m_scene.TryGetClient(agentID, out client)) + { m_log.WarnFormat("[LAND MANAGEMENT MODULE]: Unable to retrieve IClientAPI for {0}", agentID); return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); } diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 9803bdf..c4fb11e 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -925,7 +925,7 @@ namespace OpenSim.Region.CoreModules.World.Land } catch (NullReferenceException) { - m_log.Info("[LAND]: " + "Got Null Reference when searching land owners from the parcel panel"); + m_log.Error("[LAND]: " + "Got Null Reference when searching land owners from the parcel panel"); } try { @@ -1073,12 +1073,16 @@ namespace OpenSim.Region.CoreModules.World.Land public void AddPrimOverMe(SceneObjectGroup obj) { +// m_log.DebugFormat("[LAND OBJECT]: Adding scene object {0} {1} over {2}", obj.Name, obj.LocalId, LandData.Name); + lock (primsOverMe) primsOverMe.Add(obj); } public void RemovePrimFromOverMe(SceneObjectGroup obj) { +// m_log.DebugFormat("[LAND OBJECT]: Removing scene object {0} {1} from over {2}", obj.Name, obj.LocalId, LandData.Name); + lock (primsOverMe) primsOverMe.Remove(obj); } -- cgit v1.1