Fix two undo steps on add node via context menu (#3674)

This commit is contained in:
filtered
2025-04-30 01:23:12 +10:00
committed by GitHub
parent c7435af51b
commit 04815605b4
2 changed files with 3 additions and 12 deletions

View File

@@ -49,6 +49,7 @@ import { useLitegraphService } from '@/services/litegraphService'
import { useCanvasStore } from '@/stores/graphStore'
import { ComfyNodeDefImpl, useNodeDefStore } from '@/stores/nodeDefStore'
import { useSettingStore } from '@/stores/settingStore'
import { useWorkflowStore } from '@/stores/workflowStore'
import { useSearchBoxStore } from '@/stores/workspace/searchBoxStore'
import { LinkReleaseTriggerAction } from '@/types/searchBoxTypes'
import { FuseFilterWithValue } from '@/utils/fuseUtil'
@@ -101,6 +102,8 @@ const addNode = (nodeDef: ComfyNodeDefImpl) => {
canvasStore.getCanvas().linkConnector.connectToNode(node, triggerEvent)
// Notify changeTracker - new step should be added
useWorkflowStore().activeWorkflow?.changeTracker?.checkState()
window.requestAnimationFrame(closeDialog)
}