From 8e1105144a253d5c5e32fcf7d4c8295b9fa91d3a Mon Sep 17 00:00:00 2001 From: Abdo Date: Fri, 20 Oct 2023 02:38:03 +0300 Subject: [PATCH] Commit addition of IO shapes immediately (#2750) --- ts/image-occlusion/tools/tool-polygon.ts | 2 -- ts/image-occlusion/tools/tool-undo-redo.ts | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) 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 {