diff options
author | simon <none@none> | 2015-04-15 15:07:13 -0700 |
---|---|---|
committer | simon <none@none> | 2015-04-15 15:07:13 -0700 |
commit | a219cf1c98527faa0e7addeb9660f679208bb0e7 (patch) | |
tree | 78a14774f7ff79dd92c022caa2d9d68ec85fba85 /indra/newview/llpreviewscript.cpp | |
parent | b5324afb6f2e45deefb9b79e7e2192bc686b181a (diff) | |
parent | a647b8f1cbab13f07ea889c80df28414bc906129 (diff) |
Merge viewer-release
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 5c2f13a903..655828adc7 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -2056,7 +2056,8 @@ void LLLiveLSLEditor::loadAsset() { mItem = new LLViewerInventoryItem(item); // 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(), @@ -2135,9 +2136,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 ) { @@ -2166,7 +2167,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) @@ -2527,7 +2528,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(); @@ -2552,7 +2556,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. @@ -2630,7 +2637,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; |