mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-21 14:59:39 +00:00
Multiple fixes related to copying subgraphs (#6383)
- DOMWidgets have ownership reset after a `subgraphNode.clone()`. - Fixes Ctrl+C on a subgraphNode with a prompted prompt making the prompt disappear. - alt + drag uses the copy/paste pathway that deeply clones subgraphs. - Fixed dangling references on nodes in subgraphs by updating subgraph ids before configuration. - Attempt to recursively resolve disconnected proxyWidgets (Can matter when subgraphs load out of order). - Fix Right click -> clone creating linked copies of subgraphs. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6383-Multiple-fixes-related-to-copying-subgraphs-29b6d73d365081819671ced440dde327) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -158,7 +158,11 @@ function resolveLinkedWidget(
|
||||
const { graph, nodeId, widgetName } = overlay
|
||||
const n = getNodeByExecutionId(graph, nodeId)
|
||||
if (!n) return [undefined, undefined]
|
||||
return [n, n.widgets?.find((w: IBaseWidget) => w.name === widgetName)]
|
||||
const widget = n.widgets?.find((w: IBaseWidget) => w.name === widgetName)
|
||||
//Slightly hacky. Force recursive resolution of nested widgets
|
||||
if (widget instanceof disconnectedWidget.constructor && isProxyWidget(widget))
|
||||
widget.computedHeight = 20
|
||||
return [n, widget]
|
||||
}
|
||||
|
||||
function newProxyFromOverlay(subgraphNode: SubgraphNode, overlay: Overlay) {
|
||||
|
||||
Reference in New Issue
Block a user