Skip to content
Snippets Groups Projects
Commit f2560218 authored by Brian McGroarty's avatar Brian McGroarty
Browse files

Merge r135130 for DEV-4476 - Edits to notecards not visible in viewer session

parent 2cea021f
No related branches found
No related tags found
No related merge requests found
...@@ -539,7 +539,7 @@ void LLUpdateTaskInventoryResponder::uploadComplete(const LLSD& content) ...@@ -539,7 +539,7 @@ void LLUpdateTaskInventoryResponder::uploadComplete(const LLSD& content)
gVFS->removeFile(content["new_asset"].asUUID(), gVFS->removeFile(content["new_asset"].asUUID(),
LLAssetType::AT_NOTECARD); LLAssetType::AT_NOTECARD);
} }
nc->setAssetId(content["new_asset"].asUUID());
nc->refreshFromInventory(); nc->refreshFromInventory();
} }
break; break;
......
...@@ -492,3 +492,31 @@ void LLMultiPreview::tabOpen(LLFloater* opened_floater, bool from_click) ...@@ -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);
}
}
...@@ -77,6 +77,7 @@ class LLPreview : public LLFloater, LLInventoryObserver ...@@ -77,6 +77,7 @@ class LLPreview : public LLFloater, LLInventoryObserver
void setObjectID(const LLUUID& object_id); void setObjectID(const LLUUID& object_id);
void setItem( LLInventoryItem* item ); void setItem( LLInventoryItem* item );
void setAssetId(const LLUUID& asset_id);
const LLInventoryItem* getItem() const; // searches if not constructed with it const LLInventoryItem* getItem() const; // searches if not constructed with it
static void hide(const LLUUID& item_uuid, BOOL no_saving = FALSE ); static void hide(const LLUUID& item_uuid, BOOL no_saving = FALSE );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment