Fix create selection getting overwritten by multiple updates for the same prim.

soprefactor
Melanie Thielker 2010-05-31 19:00:02 +02:00 committed by Melanie
parent 8df9f272eb
commit e515467c5e
5 changed files with 13 additions and 6 deletions

View File

@ -4558,11 +4558,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (recipientID == data.OwnerID) if (recipientID == data.OwnerID)
{ {
if ((data.Flags & PrimFlags.CreateSelected) != 0) if (data.CreateSelected)
{ {
// Only send this flag once, then unset it // Only send this flag once, then unset it
flags |= PrimFlags.CreateSelected; flags |= PrimFlags.CreateSelected;
data.Flags &= ~PrimFlags.CreateSelected; data.CreateSelected = false;
} }
} }

View File

@ -1500,7 +1500,7 @@ namespace OpenSim.Region.Framework.Scenes
// We need to explicitly resend the newly link prim's object properties since no other actions // We need to explicitly resend the newly link prim's object properties since no other actions
// occur on link to invoke this elsewhere (such as object selection) // occur on link to invoke this elsewhere (such as object selection)
parentGroup.RootPart.AddFlag(PrimFlags.CreateSelected); parentGroup.RootPart.CreateSelected = true;
parentGroup.TriggerScriptChangedEvent(Changed.LINK); parentGroup.TriggerScriptChangedEvent(Changed.LINK);
parentGroup.HasGroupChanged = true; parentGroup.HasGroupChanged = true;
parentGroup.ScheduleGroupForFullUpdate(); parentGroup.ScheduleGroupForFullUpdate();

View File

@ -2254,7 +2254,7 @@ namespace OpenSim.Region.Framework.Scenes
linkPart.LinkNum = 2; linkPart.LinkNum = 2;
linkPart.SetParent(this); linkPart.SetParent(this);
linkPart.AddFlag(PrimFlags.CreateSelected); linkPart.CreateSelected = true;
//if (linkPart.PhysActor != null) //if (linkPart.PhysActor != null)
//{ //{

View File

@ -387,7 +387,6 @@ namespace OpenSim.Region.Framework.Scenes
// the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log // the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log
_flags = 0; _flags = 0;
_flags |= PrimFlags.CreateSelected;
TrimPermissions(); TrimPermissions();
//m_undo = new UndoStack<UndoState>(ParentGroup.GetSceneMaxUndo()); //m_undo = new UndoStack<UndoState>(ParentGroup.GetSceneMaxUndo());
@ -417,6 +416,7 @@ namespace OpenSim.Region.Framework.Scenes
private PrimFlags _flags = 0; private PrimFlags _flags = 0;
private DateTime m_expires; private DateTime m_expires;
private DateTime m_rezzed; private DateTime m_rezzed;
private bool m_createSelected = true;
public UUID CreatorID public UUID CreatorID
{ {
@ -967,6 +967,13 @@ namespace OpenSim.Region.Framework.Scenes
set { m_updateFlag = value; } set { m_updateFlag = value; }
} }
[XmlIgnore]
public bool CreateSelected
{
get { return m_createSelected; }
set { m_createSelected = value; }
}
#endregion #endregion
//--------------- //---------------

View File

@ -3506,7 +3506,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
parentPrim.TriggerScriptChangedEvent(Changed.LINK); parentPrim.TriggerScriptChangedEvent(Changed.LINK);
parentPrim.RootPart.AddFlag(PrimFlags.CreateSelected); parentPrim.RootPart.CreateSelected = true;
parentPrim.HasGroupChanged = true; parentPrim.HasGroupChanged = true;
parentPrim.ScheduleGroupForFullUpdate(); parentPrim.ScheduleGroupForFullUpdate();