diff --git a/browser_tests/tests/primitiveNode.spec.ts-snapshots/primitive-node-connected-chromium-linux.png b/browser_tests/tests/primitiveNode.spec.ts-snapshots/primitive-node-connected-chromium-linux.png index 80cd43050..5de44c6e2 100644 Binary files a/browser_tests/tests/primitiveNode.spec.ts-snapshots/primitive-node-connected-chromium-linux.png and b/browser_tests/tests/primitiveNode.spec.ts-snapshots/primitive-node-connected-chromium-linux.png differ diff --git a/browser_tests/tests/primitiveNode.spec.ts-snapshots/static-primitive-connected-chromium-linux.png b/browser_tests/tests/primitiveNode.spec.ts-snapshots/static-primitive-connected-chromium-linux.png index e405605b0..f5a44f64f 100644 Binary files a/browser_tests/tests/primitiveNode.spec.ts-snapshots/static-primitive-connected-chromium-linux.png and b/browser_tests/tests/primitiveNode.spec.ts-snapshots/static-primitive-connected-chromium-linux.png differ diff --git a/src/lib/litegraph/src/LGraph.ts b/src/lib/litegraph/src/LGraph.ts index 561836d1e..fefa002e4 100644 --- a/src/lib/litegraph/src/LGraph.ts +++ b/src/lib/litegraph/src/LGraph.ts @@ -2540,6 +2540,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 a580fc69a..d7f17d950 100644 --- a/src/lib/litegraph/src/widgets/BaseWidget.ts +++ b/src/lib/litegraph/src/widgets/BaseWidget.ts @@ -141,6 +141,7 @@ export abstract class BaseWidget< // @ts-expect-error Prevent naming conflicts with custom nodes. labelBaseline, promoted, + linkedWidgets, ...safeValues } = widget diff --git a/src/scripts/widgets.ts b/src/scripts/widgets.ts index 50dabe011..505c88a6c 100644 --- a/src/scripts/widgets.ts +++ b/src/scripts/widgets.ts @@ -139,6 +139,9 @@ export function addValueControlWidgets( 'Allows the linked widget to be changed automatically, for example randomizing the noise seed.' valueControl[IS_CONTROL_WIDGET] = true updateControlWidgetLabel(valueControl) + Object.defineProperty(valueControl, 'disabled', { + get: () => targetWidget.computedDisabled + }) const widgets: [IComboWidget, ...IStringWidget[]] = [valueControl] const isCombo = isComboWidget(targetWidget) @@ -160,6 +163,9 @@ export function addValueControlWidgets( updateControlWidgetLabel(comboFilter) comboFilter.tooltip = "Allows for filtering the list of values when changing the value via the control generate mode. Allows for RegEx matches in the format /abc/ to only filter to values containing 'abc'." + Object.defineProperty(comboFilter, 'disabled', { + get: () => targetWidget.computedDisabled + }) widgets.push(comboFilter) }