Merge branch 'RED-8274' into 'master'

RED-8274 - Resize redaction in header leads to error state

Closes RED-8274

See merge request redactmanager/redaction-service!250
This commit is contained in:
Corina Olariu 2024-01-18 10:11:48 +01:00
commit 192fb96552

View File

@ -100,7 +100,9 @@ public class ManualChangesApplicationService {
}
// need to reinsert the entity, due to the boundary having changed.
if (newStartOffset > -1) {
removeAndUpdateAndReInsertEntity(entityToBeResized, manualResizeRedaction, newStartOffset);
}
entityToBeResized.getManualOverwrite().addChange(manualResizeRedaction);
}
@ -140,10 +142,9 @@ public class ManualChangesApplicationService {
entityToBeResized.setPages(new HashSet<>());
entityToBeResized.getTextRange().setStart(newStartOffset);
entityToBeResized.getTextRange().setEnd(newStartOffset + manualResizeRedaction.getValue().length());
if (newStartOffset > -1) {
entityCreationService.addEntityToGraph(entityToBeResized, nodeToInsertInto);
}
}
public void resizeImage(Image image, ManualResizeRedaction manualResizeRedaction) {