diff --git a/ts/image-occlusion/tools/tool-polygon.ts b/ts/image-occlusion/tools/tool-polygon.ts index 2ea662348..73be9b279 100644 --- a/ts/image-occlusion/tools/tool-polygon.ts +++ b/ts/image-occlusion/tools/tool-polygon.ts @@ -4,7 +4,6 @@ import { fabric } from "fabric"; import type { PanZoom } from "panzoom"; -import { emitChangeSignal } from "../MaskEditor.svelte"; import { BORDER_COLOR, disableRotation, SHAPE_MASK_COLOR } from "./lib"; import { undoStack } from "./tool-undo-redo"; @@ -192,7 +191,6 @@ const generatePolygon = (canvas: fabric.Canvas, pointsList): void => { canvas.setActiveObject(polygon); // view undo redo tools undoStack.onObjectAdded(polygon.id); - emitChangeSignal(); } polygon.on("modified", () => { diff --git a/ts/image-occlusion/tools/tool-undo-redo.ts b/ts/image-occlusion/tools/tool-undo-redo.ts index 4e1ca2b72..286d6b4ec 100644 --- a/ts/image-occlusion/tools/tool-undo-redo.ts +++ b/ts/image-occlusion/tools/tool-undo-redo.ts @@ -83,6 +83,7 @@ class UndoStack { this.push(); } this.shapeIds.add(id); + emitChangeSignal(); } onObjectModified(): void {