Movie Editor: Split/Remove buttons in the timeline toolbar

Dedicated, always-visible Split (⧅) and Remove (✕) buttons act on the selected
clip — replacing the cramped corner actions that the timecode overlapped. Mirror
the S / Delete shortcuts; disabled when no clip is selected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
digital-garbage
2026-06-07 09:13:58 +03:00
co-authored by Claude Opus 4.8
parent af8d84e29e
commit 1ffb7abe29
+11
View File
@@ -182,6 +182,17 @@
const tc = el("span", "tl-tc", timecode(Math.min(ph, totalSec), p.frame_rate) + " / " + timecode(totalSec, p.frame_rate));
tlTcEl = tc; // keep ref for Player's onPlayheadChanged updates
bar.append(tc);
// Clip actions on the selected clip (also bound to S / Delete).
const hasSel = !!st.selectedSceneId;
const split = el("button", "btn ghost tiny", "⧅ Split");
split.title = "Split the selected clip at the playhead (S)"; split.disabled = !hasSel;
split.onclick = () => splitSelectedAtPlayhead();
const del = el("button", "btn ghost tiny danger", "✕ Remove");
del.title = "Remove the selected clip (Delete / Backspace)"; del.disabled = !hasSel;
del.onclick = () => { if (st.selectedSceneId) S.removeScene(st.selectedSceneId); };
bar.append(split); bar.append(del);
const spacer = el("div", "tl-spacer"); bar.append(spacer);
const keys = el("span", "tl-keys", "S split · ⌫ remove"); keys.title = "Select a clip, then: S splits it at the playhead · Delete/Backspace removes it";
bar.append(keys);