diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-03-31 22:53:16 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-03-31 22:53:16 +0200 |
| commit | f8fb238b228881ef970739b7d884912058b41347 (patch) | |
| tree | e784085f29377242c5d1441ec46b397ada5170ef /apps/web/src/lib/commands/timeline/element/delete-elements.ts | |
| parent | 0f5dca4f12d926ec0015116e85ec1129a6891f40 (diff) | |
| download | opencut-f8fb238b228881ef970739b7d884912058b41347.tar.gz | |
feat: centralize selection management
Diffstat (limited to 'apps/web/src/lib/commands/timeline/element/delete-elements.ts')
| -rw-r--r-- | apps/web/src/lib/commands/timeline/element/delete-elements.ts | 8 |
1 files changed, 6 insertions, 2 deletions
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 {
|
