Add effect to set initial sequence ID if not selected

This commit is contained in:
2026-04-14 23:40:13 +02:00
parent 8a8f60f3c9
commit 21ff64fab9

View File

@@ -2587,6 +2587,22 @@ export function App({ store, initialStatusMessage }: AppProps) {
selectedDialogueId
]);
useEffect(() => {
if (
selectedSequenceId !== null &&
editorState.projectDocument.sequences.sequences[selectedSequenceId] !==
undefined
) {
return;
}
setSelectedSequenceId(projectSequenceList[0]?.id ?? null);
}, [
editorState.projectDocument.sequences.sequences,
projectSequenceList,
selectedSequenceId
]);
useEffect(() => {
schedulePaneHeightRef.current = schedulePaneHeight;
}, [schedulePaneHeight]);