summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/newview/llassetuploadresponders.cpp5
-rwxr-xr-xindra/newview/llpanelobjectinventory.cpp5
-rwxr-xr-xindra/newview/llpreviewnotecard.cpp16
3 files changed, 19 insertions, 7 deletions
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index d2b1dcbf35..121ce647a6 100755
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -618,7 +618,10 @@ void LLUpdateTaskInventoryResponder::uploadComplete(const LLSD& content)
case LLAssetType::AT_NOTECARD:
{
// Update the UI with the new asset.
- LLPreviewNotecard* nc = LLFloaterReg::findTypedInstance<LLPreviewNotecard>("preview_notecard", LLSD(item_id));
+ LLSD floater_key;
+ floater_key["taskid"] = task_id;
+ floater_key["itemid"] = item_id;
+ LLPreviewNotecard* nc = LLFloaterReg::findTypedInstance<LLPreviewNotecard>("preview_notecard", floater_key);
if(nc)
{
// *HACK: we have to delete the asset in the VFS so
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index c8af5b6718..7e65ccad98 100755
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -1171,7 +1171,10 @@ void LLTaskNotecardBridge::openItem()
|| object->permModify()
|| gAgent.isGodlike())
{
- LLPreviewNotecard* preview = LLFloaterReg::showTypedInstance<LLPreviewNotecard>("preview_notecard", LLSD(mUUID), TAKE_FOCUS_YES);
+ LLSD floater_key;
+ floater_key["taskid"] = mPanel->getTaskUUID();
+ floater_key["itemid"] = mUUID;
+ LLPreviewNotecard* preview = LLFloaterReg::showTypedInstance<LLPreviewNotecard>("preview_notecard", floater_key, TAKE_FOCUS_YES);
if (preview)
{
preview->setObjectID(mPanel->getTaskUUID());
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index 9f88b0db5f..f100c996b3 100755
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -233,6 +233,7 @@ void LLPreviewNotecard::loadAsset()
else
{
LLHost source_sim = LLHost::invalid;
+ LLSD* user_data = new LLSD();
if (mObjectUUID.notNull())
{
LLViewerObject *objectp = gObjectList.findObject(mObjectUUID);
@@ -251,7 +252,13 @@ void LLPreviewNotecard::loadAsset()
mAssetStatus = PREVIEW_ASSET_LOADED;
return;
}
+ user_data->with("taskid", mObjectUUID).with("itemid", mItemUUID);
}
+ else
+ {
+ user_data = new LLSD(mItemUUID);
+ }
+
gAssetStorage->getInvItemAsset(source_sim,
gAgent.getID(),
gAgent.getSessionID(),
@@ -261,7 +268,7 @@ void LLPreviewNotecard::loadAsset()
item->getAssetUUID(),
item->getType(),
&onLoadComplete,
- (void*)new LLUUID(mItemUUID),
+ (void*)user_data,
TRUE);
mAssetStatus = PREVIEW_ASSET_LOADING;
}
@@ -304,9 +311,8 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
void* user_data, S32 status, LLExtStat ext_status)
{
LL_INFOS() << "LLPreviewNotecard::onLoadComplete()" << LL_ENDL;
- LLUUID* item_id = (LLUUID*)user_data;
-
- LLPreviewNotecard* preview = LLFloaterReg::findTypedInstance<LLPreviewNotecard>("preview_notecard", LLSD(*item_id));
+ LLSD* floater_key = (LLSD*)user_data;
+ LLPreviewNotecard* preview = LLFloaterReg::findTypedInstance<LLPreviewNotecard>("preview_notecard", *floater_key);
if( preview )
{
if(0 == status)
@@ -362,7 +368,7 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
preview->mAssetStatus = PREVIEW_ASSET_ERROR;
}
}
- delete item_id;
+ delete floater_key;
}
// static