diff options
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 5415c273e2..7feb20332b 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -1837,7 +1837,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(), @@ -1914,9 +1915,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 ) { @@ -1945,7 +1946,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) @@ -2304,7 +2305,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(); @@ -2329,7 +2333,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. @@ -2407,7 +2414,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; |