diff --git a/changelog.d/20231123_093015_sekachev.bs_fixed_drawn_marker.md b/changelog.d/20231123_093015_sekachev.bs_fixed_drawn_marker.md new file mode 100644 index 000000000000..e37606702321 --- /dev/null +++ b/changelog.d/20231123_093015_sekachev.bs_fixed_drawn_marker.md @@ -0,0 +1,4 @@ +### Fixed + +- Fixed minor issue when brush marker is appended to a final mask + () diff --git a/cvat-canvas/src/typescript/masksHandler.ts b/cvat-canvas/src/typescript/masksHandler.ts index 45d7cdecf17e..0f47a2de8d38 100644 --- a/cvat-canvas/src/typescript/masksHandler.ts +++ b/cvat-canvas/src/typescript/masksHandler.ts @@ -559,6 +559,7 @@ export class MasksHandlerImpl implements MasksHandler { try { if (this.drawnObjects.length) { const wrappingBbox = this.getDrawnObjectsWrappingBox(); + this.removeBrushMarker(); // remove brush marker from final mask const imageData = this.imageDataFromCanvas(wrappingBbox); const rle = zipChannels(imageData); rle.push(wrappingBbox.left, wrappingBbox.top, wrappingBbox.right, wrappingBbox.bottom); @@ -629,6 +630,7 @@ export class MasksHandlerImpl implements MasksHandler { try { if (this.drawnObjects.length) { const wrappingBbox = this.getDrawnObjectsWrappingBox(); + this.removeBrushMarker(); // remove brush marker from final mask const imageData = this.imageDataFromCanvas(wrappingBbox); const rle = zipChannels(imageData); rle.push(wrappingBbox.left, wrappingBbox.top, wrappingBbox.right, wrappingBbox.bottom);