Skip to content

The swiss army knife of lossless video/audio editing

Reset segments when last segment is deleted

Mikael Finstad0c584f4b3510
diff --git a/src/App.jsx b/src/App.jsx
index 5d53bb99..874125d8 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -711,7 +711,10 @@ const App = memo(() => {
}, [copyAnyAudioTrack, filePath, mainStreams]);
const removeCutSegment = useCallback(() => {
- if (cutSegments.length < 2) return;
+ if (cutSegments.length <= 1) {
+ setCutSegments(createInitialCutSegments());
+ return;
+ }
const cutSegmentsNew = [...cutSegments];
cutSegmentsNew.splice(currentSegIndexSafe, 1);