From 5a3ba2afbb179cf6d4d059bb6426596f0c8104dc Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 30 Oct 2019 04:46:47 +0000 Subject: always allow part deselect --- .../Region/Framework/Scenes/Scene.PacketHandlers.cs | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index b0ecb80..2a32851 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs @@ -260,21 +260,18 @@ namespace OpenSim.Region.Framework.Scenes return; bool oldgprSelect = part.ParentGroup.IsSelected; - - // This is wrong, wrong, wrong. Selection should not be - // handled by group, but by prim. Legacy cruft. - // TODO: Make selection flagging per prim! - // - if (Permissions.CanChangeSelectedState(part, (ScenePresence)remoteClient.SceneAgent)) + bool oldSelect = part.IsSelected; + part.IsSelected = false; + + if (oldgprSelect != part.ParentGroup.IsSelected) { - part.IsSelected = false; - if (!part.ParentGroup.IsAttachment && oldgprSelect != part.ParentGroup.IsSelected) + if (!part.ParentGroup.IsAttachment ) EventManager.TriggerParcelPrimCountTainted(); - - // restore targetOmega - if (part.AngularVelocity != Vector3.Zero) - part.ScheduleTerseUpdate(); } + + // restore targetOmega + if (oldSelect && part.AngularVelocity != Vector3.Zero) + part.ScheduleTerseUpdate(); } public virtual void ProcessMoneyTransferRequest(UUID source, UUID destination, int amount, -- cgit v1.1