From cd7517ccb9d522f5fecd57523285a0b17c147620 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 28 Apr 2011 22:59:12 +0100 Subject: Stop CHANGED_INVENTORY firing twice if a notecard is edited in prim. Addresses http://opensimulator.org/mantis/view.php?id=5444 Fix is to stop the asset transaction calling UpdateInventoryItem() since the caller is doing it anyway, which is more correct. This did not effect scripts. --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 4 ++++ OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 0b2b01a..b0f0de6 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1430,6 +1430,10 @@ namespace OpenSim.Region.Framework.Scenes } else // Updating existing item with new perms etc { +// m_log.DebugFormat( +// "[PRIM INVENTORY]: Updating item {0} in {1} for UpdateTaskInventory()", +// currentItem.Name, part.Name); + IAgentAssetTransactions agentTransactions = this.RequestModuleInterface(); if (agentTransactions != null) { diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 3281eab..3b60f8c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -693,8 +693,9 @@ namespace OpenSim.Region.Framework.Scenes { TaskInventoryItem it = GetInventoryItem(item.ItemID); if (it != null) - { +// m_log.DebugFormat("[PRIM INVENTORY]: Updating item {0} in {1}", item.Name, m_part.Name); + item.ParentID = m_part.UUID; item.ParentPartID = m_part.UUID; @@ -711,14 +712,16 @@ namespace OpenSim.Region.Framework.Scenes m_items[item.ItemID] = item; m_inventorySerial++; } - + if (fireScriptEvents) m_part.TriggerScriptChangedEvent(Changed.INVENTORY); + if (considerChanged) { HasInventoryChanged = true; m_part.ParentGroup.HasGroupChanged = true; } + return true; } else -- cgit v1.1