aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpreview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llpreview.cpp')
-rw-r--r--linden/indra/newview/llpreview.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/linden/indra/newview/llpreview.cpp b/linden/indra/newview/llpreview.cpp
index 6d7082b..5979ff6 100644
--- a/linden/indra/newview/llpreview.cpp
+++ b/linden/indra/newview/llpreview.cpp
@@ -597,3 +597,31 @@ void LLMultiPreview::setAutoOpenInstance(LLMultiPreview* previewp, const LLUUID&
597 sAutoOpenPreviewHandles[id] = previewp->getHandle(); 597 sAutoOpenPreviewHandles[id] = previewp->getHandle();
598 } 598 }
599} 599}
600
601void LLPreview::setAssetId(const LLUUID& asset_id)
602{
603 const LLViewerInventoryItem* item = getItem();
604 if(NULL == item)
605 {
606 return;
607 }
608
609 if(mObjectUUID.isNull())
610 {
611 // Update avatar inventory asset_id.
612 LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
613 new_item->setAssetUUID(asset_id);
614 gInventory.updateItem(new_item);
615 gInventory.notifyObservers();
616 }
617 else
618 {
619 // Update object inventory asset_id.
620 LLViewerObject* object = gObjectList.findObject(mObjectUUID);
621 if(NULL == object)
622 {
623 return;
624 }
625 object->updateViewerInventoryAsset(item, asset_id);
626 }
627}