File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -625,6 +625,24 @@ const piemenuPitches = (
625625 // Hide the widget when the exit button is clicked.
626626 block . _exitWheel . navItems [ 0 ] . navigateFunction = ( ) => {
627627 that . _piemenuExitTime = new Date ( ) . getTime ( ) ;
628+ const selectedNote =
629+ that . _pitchWheel . navItems [ that . _pitchWheel . selectedNavItemIndex ] . title ;
630+ const selectedAccidental =
631+ ! custom && that . _accidentalsWheel
632+ ? that . _accidentalsWheel . navItems [ that . _accidentalsWheel . selectedNavItemIndex ] . title
633+ : "" ;
634+
635+ // Update the block's displayed text with the note and accidental
636+ if ( selectedAccidental === "♮" || selectedAccidental === "" ) {
637+ that . text . text = selectedNote ; // Natural or no accidental
638+ } else {
639+ that . text . text = selectedNote + selectedAccidental ; // Combine note and accidental
640+ }
641+
642+ // Update the block value and refresh the cache
643+ that . value = selectedNote + ( selectedAccidental === "♮" ? "" : selectedAccidental ) ;
644+ that . container . setChildIndex ( that . text , that . container . children . length - 1 ) ;
645+ that . updateCache ( ) ;
628646 docById ( "wheelDiv" ) . style . display = "none" ;
629647 that . _pitchWheel . removeWheel ( ) ;
630648 if ( ! custom ) {
You can’t perform that action at this time.
0 commit comments