summaryrefslogtreecommitdiff
path: root/apps/web/src/components/editor/timeline/timeline-track.tsx
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2025-09-03 00:02:07 +0200
committerMaze Winther <mazewinther@gmail.com>2025-09-03 00:02:07 +0200
commit60debe2ce52a73dc554a0daa0a127fc836ca123a (patch)
tree9c334f5de4211d0bb7893929ea63c86280679705 /apps/web/src/components/editor/timeline/timeline-track.tsx
parent37d40148087fc7c3497fba31e82bc7c7496bde8d (diff)
parent167e2b83dc072f5d80ab0bf0d3f786a993248c70 (diff)
downloadopencut-60debe2ce52a73dc554a0daa0a127fc836ca123a.tar.gz
Merge branch 'staging'
Diffstat (limited to 'apps/web/src/components/editor/timeline/timeline-track.tsx')
-rw-r--r--apps/web/src/components/editor/timeline/timeline-track.tsx15
1 files changed, 4 insertions, 11 deletions
diff --git a/apps/web/src/components/editor/timeline/timeline-track.tsx b/apps/web/src/components/editor/timeline/timeline-track.tsx
index 42c78aa4..7cfde931 100644
--- a/apps/web/src/components/editor/timeline/timeline-track.tsx
+++ b/apps/web/src/components/editor/timeline/timeline-track.tsx
@@ -1147,7 +1147,7 @@ export function TimelineTrackContent({
const handleElementSplit = () => {
const { currentTime } = usePlaybackStore();
- const { splitElement } = useTimelineStore();
+ const { splitSelected } = useTimelineStore();
const splitTime = currentTime;
const effectiveStart = element.startTime;
const effectiveEnd =
@@ -1155,14 +1155,7 @@ export function TimelineTrackContent({
(element.duration - element.trimStart - element.trimEnd);
if (splitTime > effectiveStart && splitTime < effectiveEnd) {
- const secondElementId = splitElement(
- track.id,
- element.id,
- splitTime
- );
- if (!secondElementId) {
- toast.error("Failed to split element");
- }
+ splitSelected(splitTime, track.id, element.id);
} else {
toast.error("Playhead must be within element to split");
}
@@ -1182,8 +1175,8 @@ export function TimelineTrackContent({
};
const handleElementDelete = () => {
- const { removeElementFromTrack } = useTimelineStore.getState();
- removeElementFromTrack(track.id, element.id);
+ const { deleteSelected } = useTimelineStore.getState();
+ deleteSelected(track.id, element.id);
};
return (