本文整理汇总了C++中LLPreviewNotecard::refreshFromInventory方法的典型用法代码示例。如果您正苦于以下问题:C++ LLPreviewNotecard::refreshFromInventory方法的具体用法?C++ LLPreviewNotecard::refreshFromInventory怎么用?C++ LLPreviewNotecard::refreshFromInventory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLPreviewNotecard
的用法示例。
在下文中一共展示了LLPreviewNotecard::refreshFromInventory方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: uploadComplete
//virtual
void LLUpdateTaskInventoryResponder::uploadComplete(const LLSD& content)
{
llinfos << "LLUpdateTaskInventoryResponder::result from capabilities" << llendl;
LLUUID item_id = mPostData["item_id"];
LLUUID task_id = mPostData["task_id"];
dialog_refresh_all();
switch(mAssetType)
{
case LLAssetType::AT_NOTECARD:
{
// Update the UI with the new asset.
LLPreviewNotecard* nc;
nc = (LLPreviewNotecard*)LLPreview::find(item_id);
if(nc)
{
// *HACK: we have to delete the asset in the VFS so
// that the viewer will redownload it. This is only
// really necessary if the asset had to be modified by
// the uploader, so this can be optimized away in some
// cases. A better design is to have a new uuid if the
// script actually changed the asset.
if(nc->hasEmbeddedInventory())
{
gVFS->removeFile(
content["new_asset"].asUUID(),
LLAssetType::AT_NOTECARD);
}
nc->setAssetId(content["new_asset"].asUUID());
nc->refreshFromInventory();
}
}
break;
case LLAssetType::AT_LSL_TEXT:
{
if(mQueueId.notNull())
{
LLFloaterCompileQueue* queue =
(LLFloaterCompileQueue*) LLFloaterScriptQueue::findInstance(mQueueId);
if(NULL != queue)
{
queue->removeItemByItemID(item_id);
}
}
else
{
LLLiveLSLEditor* preview = LLLiveLSLEditor::find(item_id, task_id);
if (preview)
{
// Bytecode save completed
if (content["compiled"])
{
preview->callbackLSLCompileSucceeded(
task_id,
item_id,
mPostData["is_script_running"]);
}
else
{
preview->callbackLSLCompileFailed(content["errors"]);
}
}
}
}
break;
default:
break;
}
}