[backport 1.25] Fix Alt-Click-Drag-Copy of Subgraph Nodes (#4884)

Co-authored-by: Christian Byrne <cbyrne@comfy.org>
This commit is contained in:
Comfy Org PR Bot
2025-08-10 08:28:03 +08:00
committed by GitHub
parent b35525578c
commit 694ff47269
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)