summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-09-29 23:40:41 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-09-30 00:27:47 +0300
commitec3fe8c2a56d92c5eff480d7f027a1b6062bb4cf (patch)
tree58c4c54c21811cb23b6b37ab41aa41c52c665773
parentf25314737f3599d9d44fac77f7cfb7b1f0648fff (diff)
#3189 Fix missed else condition
-rw-r--r--indra/newview/llgltfmateriallist.cpp4
-rw-r--r--indra/newview/llselectmgr.cpp16
2 files changed, 4 insertions, 16 deletions
diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp
index 8da835ed7d..3e4aadc381 100644
--- a/indra/newview/llgltfmateriallist.cpp
+++ b/indra/newview/llgltfmateriallist.cpp
@@ -359,6 +359,7 @@ void LLGLTFMaterialList::queueApply(const LLViewerObject* obj, S32 side, const L
{
if (asset_id.isNull() || override_json.empty())
{
+ // If there is no asset, there can't be an override
queueApply(obj, side, asset_id);
}
else
@@ -371,6 +372,7 @@ void LLGLTFMaterialList::queueApply(const LLViewerObject* obj, S32 side, const L
{
if (asset_id.isNull() || material_override == nullptr)
{
+ // If there is no asset, there can't be an override
queueApply(obj, side, asset_id);
}
else
@@ -470,7 +472,7 @@ void LLGLTFMaterialList::flushUpdatesOnce(std::shared_ptr<CallbackHolder> callba
{
data[i]["gltf_json"] = e.override_data->asJSON();
}
- if (!e.override_json.empty())
+ else if (!e.override_json.empty())
{
data[i]["gltf_json"] = e.override_json;
}
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 01fd5ae63c..291e3c2ed3 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -2265,23 +2265,9 @@ void LLSelectMgr::selectionRevertGLTFMaterials()
//blank override out
LLGLTFMaterialList::queueApply(objectp, te, asset_id);
}
- if (old_asset_id != asset_id)
- {
- // Restore overrides and base material
- // Note: might not work reliably if asset is already there, might
- // have a server sided problem where servers applies override
- // first then resets it by adding asset, in which case need
- // to create a server ticket and chain asset then override
- // application.
- LLGLTFMaterialList::queueApply(objectp, te, asset_id, material);
- }
else
{
- // Enqueue override update to server
- // Note: this is suboptimal, better to send asset id as well
- // but there seems to be a server problem with queueApply
- // that ignores override in some cases
- LLGLTFMaterialList::queueModify(objectp, te, material);
+ LLGLTFMaterialList::queueApply(objectp, te, asset_id, material);
}
}
return true;