summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewscript.cpp
diff options
context:
space:
mode:
authorcallum_linden <none@none>2015-05-18 12:00:36 -0700
committercallum_linden <none@none>2015-05-18 12:00:36 -0700
commit80aa29eaec78d267b4fa1822cfbd3a33b268066a (patch)
tree1ce0483bd490750e367bfe53a19ec312cdc0bd27 /indra/newview/llpreviewscript.cpp
parentd214c2854110520d5574f675bcc12f64bfd42090 (diff)
parentfde0868231a25b8c9ce03a86cb53f1738d35688d (diff)
Merge with Viewer Release (after Viewer Release updated with Viewer Tools Update)
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 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;