Add effect to set initial sequence ID if not selected
This commit is contained in:
@@ -2587,6 +2587,22 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
|||||||
selectedDialogueId
|
selectedDialogueId
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (
|
||||||
|
selectedSequenceId !== null &&
|
||||||
|
editorState.projectDocument.sequences.sequences[selectedSequenceId] !==
|
||||||
|
undefined
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
setSelectedSequenceId(projectSequenceList[0]?.id ?? null);
|
||||||
|
}, [
|
||||||
|
editorState.projectDocument.sequences.sequences,
|
||||||
|
projectSequenceList,
|
||||||
|
selectedSequenceId
|
||||||
|
]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
schedulePaneHeightRef.current = schedulePaneHeight;
|
schedulePaneHeightRef.current = schedulePaneHeight;
|
||||||
}, [schedulePaneHeight]);
|
}, [schedulePaneHeight]);
|
||||||
|
|||||||
Reference in New Issue
Block a user