summaryrefslogtreecommitdiff
path: root/indra/newview/llpaneleditwearable.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-04-24 18:08:20 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-04-24 18:08:20 -0400
commiteb88e4d37850a48132193d332fa8945d3932369b (patch)
treeb65b15aae6619e54ff76d6ecac9b4d66a9df2e07 /indra/newview/llpaneleditwearable.cpp
parenta9fa707a7da9977914db8527f15b59bb6a4bc6b7 (diff)
SH-4128 WIP - cleanup around item link removal and callbacks
Diffstat (limited to 'indra/newview/llpaneleditwearable.cpp')
-rwxr-xr-x[-rw-r--r--]indra/newview/llpaneleditwearable.cpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index e71dba5cae..06c923273b 100644..100755
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -1079,10 +1079,15 @@ void LLPanelEditWearable::saveChanges(bool force_save_as)
if (force_save_as)
{
- // the name of the wearable has changed, re-save wearable with new name
- LLAppearanceMgr::instance().removeCOFItemLinks(mWearablePtr->getItemID());
+ // FIXME race condition if removeCOFItemLinks does not
+ // complete immediately. Looks like we're counting on the
+ // fact that updateAppearanceFromCOF will get called after
+ // we exit customize mode.
+
+ // the name of the wearable has changed, re-save wearable with new name
+ LLAppearanceMgr::instance().removeCOFItemLinks(mWearablePtr->getItemID());
gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, new_name, description, FALSE);
- mNameEditor->setText(mWearableItem->getName());
+ mNameEditor->setText(mWearableItem->getName());
}
else
{
@@ -1091,6 +1096,14 @@ void LLPanelEditWearable::saveChanges(bool force_save_as)
// version so texture baking service knows appearance has changed.
if (link_item)
{
+ // FIXME - two link-modifying calls here plus one
+ // inventory change request, none of which use a
+ // callback. When does a new appearance request go out
+ // and how is it synced with these changes? As above,
+ // we seem to be implicitly depending on
+ // updateAppearanceFromCOF() to be called when we
+ // exit customize mode.
+
// Create new link
link_inventory_item( gAgent.getID(),
link_item->getLinkedUUID(),
@@ -1100,9 +1113,9 @@ void LLPanelEditWearable::saveChanges(bool force_save_as)
LLAssetType::AT_LINK,
NULL);
// Remove old link
- gInventory.purgeObject(link_item->getUUID());
+ remove_inventory_item(link_item->getUUID());
}
- gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name);
+ gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name);
}