Emit graph changed event after modifying a widget value via keyboard (#1072)

This commit is contained in:
Acly
2024-10-02 21:28:42 +02:00
committed by GitHub
parent 3a2b2f9e15
commit aca2194892

View File

@@ -200,6 +200,16 @@ export class ChangeTracker {
return v
}
// Handle litegraph dialog popup for number/string widgets
const prompt = LGraphCanvas.prototype.prompt
LGraphCanvas.prototype.prompt = function (title, value, callback, event) {
const extendedCallback = (v) => {
callback(v)
changeTracker().checkState()
}
return prompt.apply(this, [title, value, extendedCallback, event])
}
// Handle litegraph context menu for COMBO widgets
const close = LiteGraph.ContextMenu.prototype.close
LiteGraph.ContextMenu.prototype.close = function (e) {