Skip to content

Commit

Permalink
Fix buts with chord changes and text menu
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronDavidNewman committed Sep 22, 2024
1 parent 3e18c0f commit a5031da
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/common/vex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,13 +439,13 @@ export const ChordSymbolGlyphs: Record<string, { code: string }> = {
code: 'csymMajorSeventh',
},
csymMinor: {
code: 'minor',
code: 'csymMinor',
},
minor: {
code: 'minor',
code: 'csymMinor',
},
'-': {
code: 'minor',
code: 'csymMinor',
},
'(': {
code: 'csymParensLeftTall',
Expand Down
11 changes: 7 additions & 4 deletions src/ui/menus/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const textBlockDialogMenuOption: SuiConfiguredMenuOption = {
id: 'textDialog',
ctor: 'SuiTextBlockDialog',
tracker: menu.view.tracker,
startPromise: null,
startPromise: menu.closePromise,
modifier: null
});
}, display: (menu: SuiMenuBase) => true,
Expand All @@ -60,7 +60,7 @@ const chordChangeDialogMenuOption: SuiConfiguredMenuOption = {
id: 'chordDialog',
ctor: 'SuiChordChangeDialog',
tracker: menu.view.tracker,
startPromise: null,
startPromise: menu.closePromise,
modifier: lyric
}
);
Expand All @@ -73,6 +73,9 @@ const chordChangeDialogMenuOption: SuiConfiguredMenuOption = {
}
const lyricsDialogMenuOption: SuiConfiguredMenuOption = {
handler: async (menu: SuiMenuBase) => {
if (menu.closePromise) {
await menu.closePromise;
}
const sel = menu.view.tracker.selections[0];
const note = sel.note;
if (!note) {
Expand All @@ -89,7 +92,7 @@ const lyricsDialogMenuOption: SuiConfiguredMenuOption = {
id: 'lyricDialog',
ctor: 'SuiLyricDialog',
tracker: menu.view.tracker,
startPromise: null,
startPromise: menu.closePromise,
modifier: lyric
});
}, display: (menu: SuiMenuBase) => true,
Expand Down Expand Up @@ -120,7 +123,7 @@ const dynamicsDialogMenuOption: SuiConfiguredMenuOption = {
id: 'dynamicsDialog',
ctor: 'SuiDynamicModifierDialog',
tracker: menu.view.tracker,
startPromise: null,
startPromise: menu.closePromise,
modifier
});
}, display: (menu: SuiMenuBase) => true,
Expand Down

0 comments on commit a5031da

Please sign in to comment.