mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-23 02:42:37 +01:00
Reset segments when last segment is deleted
This commit is contained in:
parent
ed5395ae25
commit
0c584f4b35
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user