fix: guard read_only setter to avoid redundant onReadOnlyChanged notifications

This commit is contained in:
bymyself
2026-03-12 03:09:32 -07:00
parent 17544a17b4
commit 518cd56331

View File

@@ -403,6 +403,10 @@ export class LGraphCanvas implements CustomEventDispatcher<LGraphCanvasEventMap>
}
set read_only(value: boolean) {
if (this.state.readOnly === value) {
this._updateCursorStyle()
return
}
this.state.readOnly = value
this._updateCursorStyle()
this.onReadOnlyChanged?.(value)