summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2014-11-05 17:52:14 +0200
committerandreykproductengine <akleshchev@productengine.com>2014-11-05 17:52:14 +0200
commit811878df666f5a115d7715639d618877ed4de44a (patch)
tree184a3fe052e7ba98bd0a56d0ae6e4c2d8d1e65dc /indra
parent034cb895bd5646d730e6f956af4ce849a010b184 (diff)
MAINT-202 FIXED Can't open scripts in copied objects individually on the viewer2
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llassetuploadresponders.cpp5
-rwxr-xr-xindra/newview/llpanelcontents.cpp3
-rwxr-xr-xindra/newview/llpanelobjectinventory.cpp5
-rwxr-xr-xindra/newview/llpreview.cpp2
-rwxr-xr-xindra/newview/llpreviewscript.cpp24
5 files changed, 26 insertions, 13 deletions
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index 466677b8be..02e88a8b89 100755
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -652,7 +652,10 @@ void LLUpdateTaskInventoryResponder::uploadComplete(const LLSD& content)
}
else
{
- LLLiveLSLEditor* preview = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", LLSD(item_id));
+ LLSD floater_key;
+ floater_key["taskid"] = task_id;
+ floater_key["itemid"] = item_id;
+ LLLiveLSLEditor* preview = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key);
if (preview)
{
// Bytecode save completed
diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp
index 407cbfc47b..451f41cd3b 100755
--- a/indra/newview/llpanelcontents.cpp
+++ b/indra/newview/llpanelcontents.cpp
@@ -197,9 +197,6 @@ void LLPanelContents::onClickNewScript(void *userdata)
// *TODO: The script creation should round-trip back to the
// viewer so the viewer can auto-open the script and start
// editing ASAP.
-#if 0
- LLFloaterReg::showInstance("preview_scriptedit", LLSD(inv_item->getUUID()), TAKE_FOCUS_YES);
-#endif
}
}
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index 6354b5a02b..1f16505f71 100755
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -1107,7 +1107,10 @@ void LLTaskLSLBridge::openItem()
}
if (object->permModify() || gAgent.isGodlike())
{
- LLLiveLSLEditor* preview = LLFloaterReg::showTypedInstance<LLLiveLSLEditor>("preview_scriptedit", LLSD(mUUID), TAKE_FOCUS_YES);
+ LLSD floater_key;
+ floater_key["taskid"] = mPanel->getTaskUUID();
+ floater_key["itemid"] = mUUID;
+ LLLiveLSLEditor* preview = LLFloaterReg::showTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key, TAKE_FOCUS_YES);
if (preview)
{
preview->setObjectID(mPanel->getTaskUUID());
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index 3c4d49fe65..cab7eff0dc 100755
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -53,7 +53,7 @@
LLPreview::LLPreview(const LLSD& key)
: LLFloater(key),
- mItemUUID(key.asUUID()),
+ mItemUUID(key.has("itemid") ? key.get("itemid").asUUID() : key.asUUID()),
mObjectUUID(), // set later by setObjectID()
mCopyToInvBtn( NULL ),
mForceClose(FALSE),
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;