Skip to content

Commit 1ae67dd

Browse files
authored
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.
1 parent 091a3b3 commit 1ae67dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/extensions/core/widgetInputs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ app.registerExtension({
593593
const node = LiteGraph.createNode('PrimitiveNode')
594594
if (!node) return r
595595

596-
app.graph.add(node)
596+
this.graph?.add(node)
597597

598598
// Calculate a position that wont directly overlap another node
599599
const pos: [number, number] = [

0 commit comments

Comments
 (0)