diff options
author | Justin Clark-Casey (justincc) | 2011-04-28 22:59:12 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-04-28 23:57:10 +0100 |
commit | 69fb1faa030ad199430a34f71ce18bc4b12f5c16 (patch) | |
tree | 45fbe6f5ad9c2396510b8359a016bbe6c1942523 | |
parent | Fix a bug where physical objects rezzed with an initial velocity by script do... (diff) | |
download | opensim-SC_OLD-69fb1faa030ad199430a34f71ce18bc4b12f5c16.zip opensim-SC_OLD-69fb1faa030ad199430a34f71ce18bc4b12f5c16.tar.gz opensim-SC_OLD-69fb1faa030ad199430a34f71ce18bc4b12f5c16.tar.bz2 opensim-SC_OLD-69fb1faa030ad199430a34f71ce18bc4b12f5c16.tar.xz |
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.
Diffstat (limited to '')
3 files changed, 14 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs index 771038e..9d8082b 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs | |||
@@ -41,8 +41,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
41 | /// </summary> | 41 | /// </summary> |
42 | public class AgentAssetTransactions | 42 | public class AgentAssetTransactions |
43 | { | 43 | { |
44 | // private static readonly ILog m_log = LogManager.GetLogger( | 44 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | // MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | 45 | ||
47 | // Fields | 46 | // Fields |
48 | private bool m_dumpAssetsToFile; | 47 | private bool m_dumpAssetsToFile; |
@@ -149,6 +148,10 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
149 | 148 | ||
150 | if (asset != null) | 149 | if (asset != null) |
151 | { | 150 | { |
151 | // m_log.DebugFormat( | ||
152 | // "[AGENT ASSETS TRANSACTIONS]: Updating item {0} in {1} for transaction {2}", | ||
153 | // item.Name, part.Name, transactionID); | ||
154 | |||
152 | asset.FullID = UUID.Random(); | 155 | asset.FullID = UUID.Random(); |
153 | asset.Name = item.Name; | 156 | asset.Name = item.Name; |
154 | asset.Description = item.Description; | 157 | asset.Description = item.Description; |
@@ -156,8 +159,6 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
156 | item.AssetID = asset.FullID; | 159 | item.AssetID = asset.FullID; |
157 | 160 | ||
158 | m_Scene.AssetService.Store(asset); | 161 | m_Scene.AssetService.Store(asset); |
159 | |||
160 | part.Inventory.UpdateInventoryItem(item); | ||
161 | } | 162 | } |
162 | } | 163 | } |
163 | } | 164 | } |
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 | |||
1430 | } | 1430 | } |
1431 | else // Updating existing item with new perms etc | 1431 | else // Updating existing item with new perms etc |
1432 | { | 1432 | { |
1433 | // m_log.DebugFormat( | ||
1434 | // "[PRIM INVENTORY]: Updating item {0} in {1} for UpdateTaskInventory()", | ||
1435 | // currentItem.Name, part.Name); | ||
1436 | |||
1433 | IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); | 1437 | IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); |
1434 | if (agentTransactions != null) | 1438 | if (agentTransactions != null) |
1435 | { | 1439 | { |
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 | |||
693 | { | 693 | { |
694 | TaskInventoryItem it = GetInventoryItem(item.ItemID); | 694 | TaskInventoryItem it = GetInventoryItem(item.ItemID); |
695 | if (it != null) | 695 | if (it != null) |
696 | |||
697 | { | 696 | { |
697 | // m_log.DebugFormat("[PRIM INVENTORY]: Updating item {0} in {1}", item.Name, m_part.Name); | ||
698 | |||
698 | item.ParentID = m_part.UUID; | 699 | item.ParentID = m_part.UUID; |
699 | item.ParentPartID = m_part.UUID; | 700 | item.ParentPartID = m_part.UUID; |
700 | 701 | ||
@@ -711,14 +712,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
711 | m_items[item.ItemID] = item; | 712 | m_items[item.ItemID] = item; |
712 | m_inventorySerial++; | 713 | m_inventorySerial++; |
713 | } | 714 | } |
714 | 715 | ||
715 | if (fireScriptEvents) | 716 | if (fireScriptEvents) |
716 | m_part.TriggerScriptChangedEvent(Changed.INVENTORY); | 717 | m_part.TriggerScriptChangedEvent(Changed.INVENTORY); |
718 | |||
717 | if (considerChanged) | 719 | if (considerChanged) |
718 | { | 720 | { |
719 | HasInventoryChanged = true; | 721 | HasInventoryChanged = true; |
720 | m_part.ParentGroup.HasGroupChanged = true; | 722 | m_part.ParentGroup.HasGroupChanged = true; |
721 | } | 723 | } |
724 | |||
722 | return true; | 725 | return true; |
723 | } | 726 | } |
724 | else | 727 | else |