mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 10:59:53 +00:00
Control widget fixes (#8160)
#8112 updated control widgets to be disabled when the controlled widget is disabled. However, some workflows already exist that contain a promoted control widget which does not function. This widget wouldn't be marked as disabled (and thus, demoted) until the interior subgraph was entered as updating `computedDisabled` is tacked to node draw. This is fixed by having subgraphs eagerly update the `computedDisabled` state on each node when configured. Additionally, when `createCopyForNode` was used, linkedWidget retained pointers to widgets which no longer have relation to the newly cloned widget. This is resolved by instead not copying linkedWidgets. Functionally, linkedWidgets is only used for control widgets and not copying has the effect of ensuring that seed widgets linked to a subgraph input will not display a control popover button in vue mode which does nothing. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8160-Control-widget-fixes-2ed6d73d3650816cb397f83f558471b3) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -2575,6 +2575,7 @@ export class Subgraph
|
||||
|
||||
this.inputNode.configure(data.inputNode)
|
||||
this.outputNode.configure(data.outputNode)
|
||||
for (const node of this.nodes) node.updateComputedDisabled()
|
||||
}
|
||||
|
||||
override configure(
|
||||
|
||||
@@ -142,6 +142,7 @@ export abstract class BaseWidget<
|
||||
// @ts-expect-error Prevent naming conflicts with custom nodes.
|
||||
labelBaseline,
|
||||
promoted,
|
||||
linkedWidgets,
|
||||
...safeValues
|
||||
} = widget
|
||||
|
||||
|
||||
Reference in New Issue
Block a user