From f8fb238b228881ef970739b7d884912058b41347 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Tue, 31 Mar 2026 22:53:16 +0200 Subject: feat: centralize selection management --- apps/web/src/lib/commands/timeline/element/delete-elements.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'apps/web/src/lib/commands/timeline/element/delete-elements.ts') diff --git a/apps/web/src/lib/commands/timeline/element/delete-elements.ts b/apps/web/src/lib/commands/timeline/element/delete-elements.ts index 4bbb0d48..26277f95 100644 --- a/apps/web/src/lib/commands/timeline/element/delete-elements.ts +++ b/apps/web/src/lib/commands/timeline/element/delete-elements.ts @@ -1,4 +1,4 @@ -import { Command } from "@/lib/commands/base-command"; +import { Command, type CommandResult } from "@/lib/commands/base-command"; import type { TimelineTrack } from "@/lib/timeline"; import { EditorCore } from "@/core"; import { rippleShiftElements } from "@/lib/timeline"; @@ -21,7 +21,7 @@ export class DeleteElementsCommand extends Command { this.rippleEnabled = rippleEnabled; } - execute(): void { + execute(): CommandResult { const editor = EditorCore.getInstance(); this.savedState = editor.timeline.getTracks(); @@ -69,6 +69,10 @@ export class DeleteElementsCommand extends Command { .filter((track) => track.elements.length > 0 || isMainTrack(track)); editor.timeline.updateTracks(updatedTracks); + + return { + select: [], + }; } undo(): void { -- cgit v1.3.1