mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-24 05:38:13 +08:00
Split widget callbacks into update and commit so only the latter adds a history state (#1584)
* feat: split commit and update layout * feat: add on_commit callback * Code review * fix: refactor --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
f25038067e
commit
9530e55ace
@@ -54,7 +54,7 @@
|
||||
...entry,
|
||||
|
||||
// Shared names with fields that need to be converted from the type used in `MenuBarEntry` to that of `MenuListEntry`
|
||||
action: () => editor.instance.updateLayout(updateMenuBarLayout.layoutTarget, entry.action.widgetId, undefined),
|
||||
action: () => editor.instance.widgetValueCommitAndUpdate(updateMenuBarLayout.layoutTarget, entry.action.widgetId, undefined),
|
||||
children: entry.children ? entry.children.map((entries) => entries.map((entry) => menuBarEntryToMenuListEntry(entry))) : undefined,
|
||||
|
||||
// New fields in `MenuListEntry`
|
||||
|
||||
Reference in New Issue
Block a user