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.
0.7.1-dev
Justin Clark-Casey (justincc) 2011-04-05 18:24:23 +01:00
parent c1dec225ab
commit 3d400fc663
1 changed files with 18 additions and 13 deletions

View File

@ -206,25 +206,29 @@ namespace OpenSim.Region.CoreModules.World.Land
else else
parcelCounts.Users[obj.OwnerID] = partCount; parcelCounts.Users[obj.OwnerID] = partCount;
if (landData.IsGroupOwned) if (obj.IsSelected)
{ {
if (obj.OwnerID == landData.GroupID) parcelCounts.Selected += partCount;
parcelCounts.Owner += partCount;
else if (landData.GroupID != UUID.Zero && obj.GroupID == landData.GroupID)
parcelCounts.Group += partCount;
else
parcelCounts.Others += partCount;
} }
else else
{ {
if (obj.OwnerID == landData.OwnerID) if (landData.IsGroupOwned)
parcelCounts.Owner += partCount; {
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 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.Owner;
count += counts.Group; count += counts.Group;
count += counts.Others; count += counts.Others;
count += counts.Selected;
} }
} }