diff options
author | Cinder Biscuits <cinder@alchemyviewer.org> | 2015-11-29 20:14:22 -0700 |
---|---|---|
committer | Cinder Biscuits <cinder@alchemyviewer.org> | 2015-11-29 20:14:22 -0700 |
commit | cc235cdcc41fb1846b878769f5d4097ff9ad3b4d (patch) | |
tree | d34f501bcfd68cad9dd2a3a3bbbb03129e24462f /indra/newview/llpreviewscript.cpp | |
parent | 0ba5502506d84fb2a41ce62cb8025ec93b652d38 (diff) | |
parent | e611e35e033e99f619b0e4938f6879c8e387efd5 (diff) |
Merged lindenlab/viewer-tools-update into default
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
-rwxr-xr-x | indra/newview/llpreviewscript.cpp | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 9184159321..7588c29ab8 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -1747,7 +1747,8 @@ void LLLiveLSLEditor::loadAsset() else if(item && mItem.notNull()) { // request the text from the object - LLUUID* user_data = new LLUUID(mItemUUID); // ^ mObjectUUID + LLSD* user_data = new LLSD(); + user_data->with("taskid", mObjectUUID).with("itemid", mItemUUID); gAssetStorage->getInvItemAsset(object->getRegion()->getHost(), gAgent.getID(), gAgent.getSessionID(), @@ -1824,9 +1825,9 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id, { LL_DEBUGS() << "LLLiveLSLEditor::onLoadComplete: got uuid " << asset_id << LL_ENDL; - LLUUID* xored_id = (LLUUID*)user_data; + LLSD* floater_key = (LLSD*)user_data; - LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", *xored_id); + LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", *floater_key); if(instance ) { @@ -1855,7 +1856,7 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id, } } - delete xored_id; + delete floater_key; } void LLLiveLSLEditor::loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type) @@ -2111,7 +2112,10 @@ void LLLiveLSLEditor::onSaveTextComplete(const LLUUID& asset_uuid, void* user_da } else { - LLLiveLSLEditor* self = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", data->mItem->getUUID()); // ^ data->mSaveObjectID + LLSD floater_key; + floater_key["taskid"] = data->mSaveObjectID; + floater_key["itemid"] = data->mItem->getUUID(); + LLLiveLSLEditor* self = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key); if (self) { self->getWindow()->decBusyCount(); @@ -2136,7 +2140,10 @@ void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* use if(0 ==status) { LL_INFOS() << "LSL Bytecode saved" << LL_ENDL; - LLLiveLSLEditor* self = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", data->mItem->getUUID()); // ^ data->mSaveObjectID + LLSD floater_key; + floater_key["taskid"] = data->mSaveObjectID; + floater_key["itemid"] = data->mItem->getUUID(); + LLLiveLSLEditor* self = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key); if (self) { // Tell the user that the compile worked. @@ -2214,7 +2221,10 @@ void LLLiveLSLEditor::processScriptRunningReply(LLMessageSystem* msg, void**) msg->getUUIDFast(_PREHASH_Script, _PREHASH_ObjectID, object_id); msg->getUUIDFast(_PREHASH_Script, _PREHASH_ItemID, item_id); - LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", item_id); // ^ object_id + LLSD floater_key; + floater_key["taskid"] = object_id; + floater_key["itemid"] = item_id; + LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key); if(instance) { instance->mHaveRunningInfo = TRUE; |