diff options
author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2015-09-10 11:22:35 +0300 |
---|---|---|
committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2015-09-10 11:22:35 +0300 |
commit | 744c1453ed595681cb30badfdd2cfc0bb4c6ccb3 (patch) | |
tree | f1dde97417bed95ea05aab861a149652c1fea954 /indra/newview | |
parent | b996f2ca55b31ed055233e59bf356a84632c9e10 (diff) |
MAINT-909 FIXED Opening a notecard with the same name as one that is already open does not work
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llassetuploadresponders.cpp | 5 | ||||
-rwxr-xr-x | indra/newview/llpanelobjectinventory.cpp | 5 | ||||
-rwxr-xr-x | indra/newview/llpreviewnotecard.cpp | 16 |
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 |