Ensure selected dialogue ID is set on initial load
This commit is contained in:
@@ -2478,6 +2478,22 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
||||
setPlayerStartKeyboardCaptureAction(null);
|
||||
}, [selectedPlayerStart?.id]);
|
||||
|
||||
useEffect(() => {
|
||||
if (
|
||||
selectedDialogueId !== null &&
|
||||
editorState.projectDocument.dialogues.dialogues[selectedDialogueId] !==
|
||||
undefined
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
setSelectedDialogueId(projectDialogueList[0]?.id ?? null);
|
||||
}, [
|
||||
editorState.projectDocument.dialogues.dialogues,
|
||||
projectDialogueList,
|
||||
selectedDialogueId
|
||||
]);
|
||||
|
||||
useEffect(() => {
|
||||
schedulePaneHeightRef.current = schedulePaneHeight;
|
||||
}, [schedulePaneHeight]);
|
||||
|
||||
Reference in New Issue
Block a user