Skip to content

Commit

Permalink
Register find-glyphs-that-use-glyph action conditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncozens committed Dec 20, 2024
1 parent d2544eb commit b95da6f
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/fontra/views/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -532,15 +532,6 @@ export class EditorController extends ViewController {
() => this.doSelectPreviousNextGlyph(false)
);

registerAction(
"action.find-glyphs-that-use",
{
topic,
titleKey: "menubar.view.find-glyphs-that-use",
},
() => this.doFindGlyphsThatUseGlyph()
);

registerAction(
"action.replace-selected-glyph-on-canvas",
{
Expand Down Expand Up @@ -703,6 +694,16 @@ export class EditorController extends ViewController {
(event) => this.fontController.exportAs({ format })
);
}
if (this.fontController.backendInfo.features["find-glyphs-that-use-glyph"]) {
registerAction(
"action.find-glyphs-that-use",
{
topic: "0030-action-topics.menu.edit",
titleKey: "menubar.view.find-glyphs-that-use",
disabled: true,
},
() => this.doFindGlyphsThatUseGlyph()
);
}
}

Expand Down

0 comments on commit b95da6f

Please sign in to comment.