From 3d400fc663104b6d899ee37afeb7f83c68af45d4 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 5 Apr 2011 18:24:23 +0100 Subject: If an object is selected, then don't include it in owner/group/others prim counts. This fixes the total prim count that the viewer displays when prims are selected - it appears to ignore the total that we pass it and adds up the counts separately. --- .../CoreModules/World/Land/PrimCountModule.cs | 31 +++++++++++++--------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'OpenSim/Region/CoreModules/World') diff --git a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs index bc140ae..7a04eb1 100644 --- a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs @@ -206,25 +206,29 @@ namespace OpenSim.Region.CoreModules.World.Land else parcelCounts.Users[obj.OwnerID] = partCount; - if (landData.IsGroupOwned) + if (obj.IsSelected) { - if (obj.OwnerID == landData.GroupID) - parcelCounts.Owner += partCount; - else if (landData.GroupID != UUID.Zero && obj.GroupID == landData.GroupID) - parcelCounts.Group += partCount; - else - parcelCounts.Others += partCount; + parcelCounts.Selected += partCount; } else { - if (obj.OwnerID == landData.OwnerID) - parcelCounts.Owner += partCount; + if (landData.IsGroupOwned) + { + if (obj.OwnerID == landData.GroupID) + parcelCounts.Owner += partCount; + else if (landData.GroupID != UUID.Zero && obj.GroupID == landData.GroupID) + parcelCounts.Group += partCount; + else + parcelCounts.Others += partCount; + } else - parcelCounts.Others += partCount; + { + if (obj.OwnerID == landData.OwnerID) + parcelCounts.Owner += partCount; + else + parcelCounts.Others += partCount; + } } - - if (obj.IsSelected) - parcelCounts.Selected += partCount; } } @@ -380,6 +384,7 @@ namespace OpenSim.Region.CoreModules.World.Land count = counts.Owner; count += counts.Group; count += counts.Others; + count += counts.Selected; } } -- cgit v1.1