From bc1f186502f20139cb85bbbb2f2eb6a78c9a5c5c Mon Sep 17 00:00:00 2001 From: AustinMroz Date: Fri, 5 Sep 2025 10:35:55 -0700 Subject: [PATCH] Fix double click primitive widgets with subgraphs (#5372) Double clicking the input slot of a node creates and connects a primitive widget. However, this code would always add the created primitive to the root graph. --- src/extensions/core/widgetInputs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extensions/core/widgetInputs.ts b/src/extensions/core/widgetInputs.ts index 46954430f..7f772aefc 100644 --- a/src/extensions/core/widgetInputs.ts +++ b/src/extensions/core/widgetInputs.ts @@ -593,7 +593,7 @@ app.registerExtension({ const node = LiteGraph.createNode('PrimitiveNode') if (!node) return r - app.graph.add(node) + this.graph?.add(node) // Calculate a position that wont directly overlap another node const pos: [number, number] = [