summaryrefslogtreecommitdiff
path: root/apps/web/src/lib/commands/timeline/element/delete-elements.ts
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2026-03-31 22:54:06 +0200
committerMaze Winther <mazewinther@gmail.com>2026-03-31 22:54:06 +0200
commitcc150c7cfb859dfc38372210ec5bcc8bd196bbc4 (patch)
tree6cc57c2c54b6fd941b97c663b919f934b1445dde /apps/web/src/lib/commands/timeline/element/delete-elements.ts
parent0488a6be455c225535414fd651c838c355a9d3bd (diff)
parentf8fb238b228881ef970739b7d884912058b41347 (diff)
downloadopencut-cc150c7cfb859dfc38372210ec5bcc8bd196bbc4.tar.gz
Merge branch 'refactor-selection-commands'
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.ts8
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 {