From e7e4121425fe7b4fd393217ea88556e44014526c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Sun, 5 Mar 2023 21:05:44 +0100 Subject: [PATCH] fix: only record annotation color if not default --- webui/src/components/display/blobs/AudioViewer.svelte | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/webui/src/components/display/blobs/AudioViewer.svelte b/webui/src/components/display/blobs/AudioViewer.svelte index 7eb7658..559d255 100644 --- a/webui/src/components/display/blobs/AudioViewer.svelte +++ b/webui/src/components/display/blobs/AudioViewer.svelte @@ -118,10 +118,12 @@ c: new TimeFragment(region.start, region.end).toString(), }); - await putEntityAttribute(entity, "COLOR", { - t: "String", - c: region.color, - }); + if (region.color !== DEFAULT_ANNOTATION_COLOR) { + await putEntityAttribute(entity, "COLOR", { + t: "String", + c: region.color, + }); + } if (Object.values(region.data).length) { await putEntityAttribute(entity, "NOTE", region.data as IValue);