File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ import { useLitegraphService } from '@/services/litegraphService'
4949import { useCanvasStore } from ' @/stores/graphStore'
5050import { ComfyNodeDefImpl , useNodeDefStore } from ' @/stores/nodeDefStore'
5151import { useSettingStore } from ' @/stores/settingStore'
52+ import { useWorkflowStore } from ' @/stores/workflowStore'
5253import { useSearchBoxStore } from ' @/stores/workspace/searchBoxStore'
5354import { LinkReleaseTriggerAction } from ' @/types/searchBoxTypes'
5455import { FuseFilterWithValue } from ' @/utils/fuseUtil'
@@ -101,6 +102,8 @@ const addNode = (nodeDef: ComfyNodeDefImpl) => {
101102
102103 canvasStore .getCanvas ().linkConnector .connectToNode (node , triggerEvent )
103104
105+ // Notify changeTracker - new step should be added
106+ useWorkflowStore ().activeWorkflow ?.changeTracker ?.checkState ()
104107 window .requestAnimationFrame (closeDialog )
105108}
106109
Original file line number Diff line number Diff line change 11import { LGraphCanvas , LiteGraph } from '@comfyorg/litegraph'
2- import { LGraphNode } from '@comfyorg/litegraph'
32import * as jsondiffpatch from 'jsondiffpatch'
43import _ from 'lodash'
54import log from 'loglevel'
@@ -301,17 +300,6 @@ export class ChangeTracker {
301300 return v
302301 }
303302
304- // Detects nodes being added via the node search dialog
305- const onNodeAdded = LiteGraph . LGraph . prototype . onNodeAdded
306- LiteGraph . LGraph . prototype . onNodeAdded = function ( node : LGraphNode ) {
307- const v = onNodeAdded ?. apply ( this , [ node ] )
308- if ( ! app ?. configuringGraph ) {
309- logger . debug ( 'checkState on onNodeAdded' )
310- checkState ( )
311- }
312- return v
313- }
314-
315303 // Handle multiple commands as a single transaction
316304 document . addEventListener ( 'litegraph:canvas' , ( e : Event ) => {
317305 const detail = ( e as CustomEvent ) . detail
You can’t perform that action at this time.
0 commit comments