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.
This commit is contained in:
AustinMroz
2025-09-05 10:35:55 -07:00
committed by snomiao
parent 15dcf40d16
commit bc1f186502

View File

@@ -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] = [