From 36b8196f7a1d1a2350649d018bdd344e44e35461 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sun, 25 May 2008 19:21:21 +0000 Subject: Thank you kindly, Tiffany for a patch that helps: Drag copy a prim and the prim that is moved, persists. The prim that is created does not survive a restart. --- OpenSim/Region/Environment/Scenes/InnerScene.cs | 7 +++++++ OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 9 +++------ 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 65012ad..84de71f 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs @@ -1417,6 +1417,13 @@ namespace OpenSim.Region.Environment.Scenes Entities.Add(copy.UUID, copy); } + // Since we copy from a source group that is in selected + // state, but the copy is shown deselected in the viewer, + // We need to clear the selection flag here, else that + // prim never gets persisted at all. The client doesn't + // think it's selected, so it will never send a deselect... + copy.IsSelected=false; + m_numPrim++; copy.StartScripts(); diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 4de10c7..25b3d16 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -1078,11 +1078,8 @@ namespace OpenSim.Region.Environment.Scenes // don't backup while it's selected or you're asking for changes mid stream. if (HasGroupChanged) { - // FIXME: Disabling this check temporarily since it seems that in some (as yet unidentified) - // circumstances with shift copy, we never register that some prims have been deselected, even though - // they are no longer selected in the client. -// if (!IsSelected) -// { + if ((!IsSelected) && (RootPart != null)) + { m_log.InfoFormat("[SCENE OBJECT GROUP]: Storing object {0}", UUID); SceneObjectGroup backup_group = Copy(OwnerID, GroupID, false); @@ -1093,7 +1090,7 @@ namespace OpenSim.Region.Environment.Scenes backup_group.ForEachPart(delegate(SceneObjectPart part) { part.ProcessInventoryBackup(datastore); }); backup_group = null; -// } + } // else // { // m_log.DebugFormat( -- cgit v1.1