From b0d7a7f0f4ef9a4507ffde2e6d9adfbf28b24a2c Mon Sep 17 00:00:00 2001 From: AustinMroz Date: Mon, 19 Jan 2026 12:59:01 -0800 Subject: [PATCH] Control widget fixes (#8160) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #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) --- src/lib/litegraph/src/LGraph.ts | 1 + src/lib/litegraph/src/widgets/BaseWidget.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/lib/litegraph/src/LGraph.ts b/src/lib/litegraph/src/LGraph.ts index 486831e13..401de111b 100644 --- a/src/lib/litegraph/src/LGraph.ts +++ b/src/lib/litegraph/src/LGraph.ts @@ -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( diff --git a/src/lib/litegraph/src/widgets/BaseWidget.ts b/src/lib/litegraph/src/widgets/BaseWidget.ts index ee32e71d8..9104c8a5b 100644 --- a/src/lib/litegraph/src/widgets/BaseWidget.ts +++ b/src/lib/litegraph/src/widgets/BaseWidget.ts @@ -142,6 +142,7 @@ export abstract class BaseWidget< // @ts-expect-error Prevent naming conflicts with custom nodes. labelBaseline, promoted, + linkedWidgets, ...safeValues } = widget