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.bulletsim
parent
50aa93137d
commit
cd7517ccb9
OpenSim/Region
CoreModules/Agent/AssetTransaction
Framework/Scenes
|
@ -41,8 +41,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class AgentAssetTransactions
|
public class AgentAssetTransactions
|
||||||
{
|
{
|
||||||
// private static readonly ILog m_log = LogManager.GetLogger(
|
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
// MethodBase.GetCurrentMethod().DeclaringType);
|
|
||||||
|
|
||||||
// Fields
|
// Fields
|
||||||
private bool m_dumpAssetsToFile;
|
private bool m_dumpAssetsToFile;
|
||||||
|
@ -149,6 +148,10 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||||
|
|
||||||
if (asset != null)
|
if (asset != null)
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[AGENT ASSETS TRANSACTIONS]: Updating item {0} in {1} for transaction {2}",
|
||||||
|
// item.Name, part.Name, transactionID);
|
||||||
|
|
||||||
asset.FullID = UUID.Random();
|
asset.FullID = UUID.Random();
|
||||||
asset.Name = item.Name;
|
asset.Name = item.Name;
|
||||||
asset.Description = item.Description;
|
asset.Description = item.Description;
|
||||||
|
@ -156,8 +159,6 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||||
item.AssetID = asset.FullID;
|
item.AssetID = asset.FullID;
|
||||||
|
|
||||||
m_Scene.AssetService.Store(asset);
|
m_Scene.AssetService.Store(asset);
|
||||||
|
|
||||||
part.Inventory.UpdateInventoryItem(item);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1430,6 +1430,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
else // Updating existing item with new perms etc
|
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<IAgentAssetTransactions>();
|
IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>();
|
||||||
if (agentTransactions != null)
|
if (agentTransactions != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -693,8 +693,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
TaskInventoryItem it = GetInventoryItem(item.ItemID);
|
TaskInventoryItem it = GetInventoryItem(item.ItemID);
|
||||||
if (it != null)
|
if (it != null)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat("[PRIM INVENTORY]: Updating item {0} in {1}", item.Name, m_part.Name);
|
||||||
|
|
||||||
item.ParentID = m_part.UUID;
|
item.ParentID = m_part.UUID;
|
||||||
item.ParentPartID = m_part.UUID;
|
item.ParentPartID = m_part.UUID;
|
||||||
|
|
||||||
|
@ -714,11 +715,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if (fireScriptEvents)
|
if (fireScriptEvents)
|
||||||
m_part.TriggerScriptChangedEvent(Changed.INVENTORY);
|
m_part.TriggerScriptChangedEvent(Changed.INVENTORY);
|
||||||
|
|
||||||
if (considerChanged)
|
if (considerChanged)
|
||||||
{
|
{
|
||||||
HasInventoryChanged = true;
|
HasInventoryChanged = true;
|
||||||
m_part.ParentGroup.HasGroupChanged = true;
|
m_part.ParentGroup.HasGroupChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue