From 144fb0c315b5db9ddb275110ca923965ff8bbb49 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 28 Sep 2022 20:18:21 +0300 Subject: SL-18233 Fixed editor not udpating after saving material from task inventory --- indra/newview/llmaterialeditor.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'indra/newview') 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("material_editor", LLSD(itemId)); + LLSD floater_key; + floater_key["taskid"] = taskId; + floater_key["itemid"] = itemId; + LLMaterialEditor* me = LLFloaterReg::findTypedInstance("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(); -- cgit v1.2.3