diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-09-28 20:18:21 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-09-28 20:18:21 +0300 |
commit | 144fb0c315b5db9ddb275110ca923965ff8bbb49 (patch) | |
tree | 0ec75a82e5256692a3febb6b2900df1240042bd9 | |
parent | 6b46793771a1d1db1601105604ac7bc82f8db7b3 (diff) |
SL-18233 Fixed editor not udpating after saving material from task inventory
-rw-r--r-- | indra/newview/llmaterialeditor.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 1592235dba..3245c6629a 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -1007,11 +1007,15 @@ void LLMaterialEditor::finishInventoryUpload(LLUUID itemId, LLUUID newAssetId, L void LLMaterialEditor::finishTaskUpload(LLUUID itemId, LLUUID newAssetId, LLUUID taskId) { - LLMaterialEditor* me = LLFloaterReg::findTypedInstance<LLMaterialEditor>("material_editor", LLSD(itemId)); + LLSD floater_key; + floater_key["taskid"] = taskId; + floater_key["itemid"] = itemId; + LLMaterialEditor* me = LLFloaterReg::findTypedInstance<LLMaterialEditor>("material_editor", floater_key); if (me) { me->setAssetId(newAssetId); me->refreshFromInventory(); + me->setEnabled(true); } } @@ -1048,7 +1052,17 @@ void LLMaterialEditor::refreshFromInventory(const LLUUID& new_item_id) if (new_item_id.notNull()) { mItemUUID = new_item_id; - setKey(LLSD(new_item_id)); + if (mObjectUUID.isNull()) + { + setKey(LLSD(new_item_id)); + } + else + { + LLSD floater_key; + floater_key["taskid"] = new_item_id; + floater_key["itemid"] = mObjectUUID; + setKey(floater_key); + } } LL_DEBUGS() << "LLPreviewNotecard::refreshFromInventory()" << LL_ENDL; loadAsset(); |