summaryrefslogtreecommitdiff
path: root/indra/newview/llpaneleditwearable.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-01-15 20:30:20 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-01-15 20:30:20 -0500
commitf48011e4d04f744a93a18267bf7b78ec0b717b7c (patch)
tree6d85cc54b4090f808cdaa734293c47b8e037c7f8 /indra/newview/llpaneleditwearable.cpp
parent6390188ff35c47c93748c6fe3023d0bad219dea6 (diff)
SH-3339 WIP, SH-3645 WIP - added getActualDescription to obviate an obnoxious and widely-used workaround, re-create COF link after wearable edit to force COF version bump
Diffstat (limited to 'indra/newview/llpaneleditwearable.cpp')
-rwxr-xr-x[-rw-r--r--]indra/newview/llpaneleditwearable.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 606e78bd58..cca3b90329 100644..100755
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -1065,7 +1065,27 @@ void LLPanelEditWearable::saveChanges(bool force_save_as)
}
else
{
- gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name);
+ LLInventoryModel::item_array_t links =
+ LLAppearanceMgr::instance().findCOFItemLinks(mWearablePtr->getItemID());
+ if (links.size()>0)
+ {
+ // Make another copy of this link, with the same description.
+ LLInventoryItem *item = links.get(0).get();
+ if (item)
+ {
+ const std::string description = item->getIsLinkType() ? item->getActualDescription() : "";
+ link_inventory_item( gAgent.getID(),
+ item->getLinkedUUID(),
+ LLAppearanceMgr::instance().getCOF(),
+ item->getName(),
+ description,
+ LLAssetType::AT_LINK,
+ NULL);
+ gInventory.purgeObject(item->getUUID());
+ }
+ }
+ gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name);
+
}
}