summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewscript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
-rwxr-xr-xindra/newview/llpreviewscript.cpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index a41986373e..92febf6c85 100755
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -1840,7 +1840,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(),
@@ -1917,9 +1918,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 )
{
@@ -1948,7 +1949,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)
@@ -2307,7 +2308,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();
@@ -2332,7 +2336,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.
@@ -2410,7 +2417,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;