Fix undo / redo resets viewport (#3834)

This commit is contained in:
filtered
2025-05-09 18:55:34 +10:00
committed by GitHub
parent 0f95ed852e
commit 3bd87820eb

View File

@@ -1062,8 +1062,8 @@ export class ComfyApp {
try {
// @ts-expect-error Discrepancies between zod and litegraph - in progress
this.graph.configure(graphData)
if (restore_view) {
if (
restore_view &&
useSettingStore().get('Comfy.EnableWorkflowViewRestore') &&
graphData.extra?.ds
) {
@@ -1077,6 +1077,7 @@ export class ComfyApp {
useLitegraphService().fitView()
})
}
}
} catch (error) {
useDialogService().showErrorDialog(error, {
title: t('errorDialog.loadWorkflowTitle'),