diff options
author | Brian McGroarty <soft@lindenlab.com> | 2009-10-14 20:49:17 +0000 |
---|---|---|
committer | Brian McGroarty <soft@lindenlab.com> | 2009-10-14 20:49:17 +0000 |
commit | f25602181f22d7f65f32ff970a5f4def3e6b8e6d (patch) | |
tree | 38186ecf06e823698b255bba401bee24e7c4d8f2 /indra/newview/llpreview.cpp | |
parent | 2cea021f5e0d9f7e0688ab247c6358185af802fb (diff) |
Merge r135130 for DEV-4476 - Edits to notecards not visible in viewer session
Diffstat (limited to 'indra/newview/llpreview.cpp')
-rw-r--r-- | indra/newview/llpreview.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp index ab253e012d..b06e70c00a 100644 --- a/indra/newview/llpreview.cpp +++ b/indra/newview/llpreview.cpp @@ -492,3 +492,31 @@ void LLMultiPreview::tabOpen(LLFloater* opened_floater, bool from_click) } } + +void LLPreview::setAssetId(const LLUUID& asset_id) +{ + const LLViewerInventoryItem* item = dynamic_cast<const LLViewerInventoryItem*>(getItem()); + if(NULL == item) + { + return; + } + + if(mObjectUUID.isNull()) + { + // Update avatar inventory asset_id. + LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); + new_item->setAssetUUID(asset_id); + gInventory.updateItem(new_item); + gInventory.notifyObservers(); + } + else + { + // Update object inventory asset_id. + LLViewerObject* object = gObjectList.findObject(mObjectUUID); + if(NULL == object) + { + return; + } + object->updateViewerInventoryAsset(item, asset_id); + } +} |