Skip to content

Commit

Permalink
Emit graph changed event after modifying a widget value via keyboard (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Acly authored Oct 2, 2024
1 parent 3a2b2f9 commit aca2194
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/scripts/changeTracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit aca2194

Please sign in to comment.