Fix Alt-Click-Drag-Copy of Subgraph Nodes (#4879)

This commit is contained in:
Christian Byrne
2025-08-09 15:33:59 -07:00
committed by GitHub
parent 79b4c78116
commit 8f289c8e67
2 changed files with 64 additions and 0 deletions

View File

@@ -2299,6 +2299,8 @@ export class LGraphCanvas
const node_data = node.clone()?.serialize()
if (node_data?.type != null) {
// Ensure the cloned node is configured against the correct type (especially for SubgraphNodes)
node_data.type = newType
const cloned = LiteGraph.createNode(newType)
if (cloned) {
cloned.configure(node_data)