From cef0f8beaf373f238214bb5b90e5833d8d930850 Mon Sep 17 00:00:00 2001 From: George Date: Fri, 17 Mar 2023 17:23:39 +0200 Subject: [PATCH] RED-6361, fix OCR documents image hint annotations showing the hide button when already hidden. --- .../modules/pdf-viewer/services/annotation-draw.service.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts b/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts index 8f7b17d59..7f6f45016 100644 --- a/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts +++ b/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts @@ -146,10 +146,13 @@ export class AnnotationDrawService { annotation.Id = annotationWrapper.id; annotation.ReadOnly = true; + const isOCR = annotationWrapper.isOCR && !annotationWrapper.isSuggestionResize; + if (isOCR && !this._annotationManager.isHidden(annotationWrapper.annotationId)) { + this._annotationManager.addToHidden(annotationWrapper.annotationId); + } annotation.Hidden = annotationWrapper.isChangeLogRemoved || (hideSkipped && annotationWrapper.isSkipped) || - (annotationWrapper.isOCR && !annotationWrapper.isSuggestionResize) || this._annotationManager.isHidden(annotationWrapper.annotationId); annotation.setCustomData('redact-manager', 'true'); annotation.setCustomData('redaction', String(annotationWrapper.previewAnnotation));