Skip to content

Commit

Permalink
Merge pull request #97 from music-encoding/isAccidentalVisibleFix
Browse files Browse the repository at this point in the history
 Sibelius' IsAccidentalVisible ignores AccidentalStyle=HiddenAcc
  • Loading branch information
ahankinson authored Dec 13, 2018
2 parents 3809eba + cb17f95 commit 083c454
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ExportConverters.mss
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ function HasVisibleAccidental (noteobj) {
// Sibelius 7.1.3 introduced the IsAccidentalVisible parameter. Sweet.
if (Sibelius.ProgramVersion >= 7130)
{
return noteobj.IsAccidentalVisible;
return noteobj.IsAccidentalVisible and (noteobj.AccidentalStyle != HiddenAcc);
}

// If it has a cautionary accidental, it's most likely to be visible.
Expand Down
4 changes: 4 additions & 0 deletions test/sib-test/TestExportConverters.mss
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ function TestHasVisibleAccidentalConverter (assert, plugin) {
note10 = noterest10[0];
output = sibmei2.HasVisibleAccidental(note10);
assert.OK(output, 'The 2nd note in the 7th bar has a visible F natural');
noterest11 = bar7.NthBarObject(2);
note11 = noterest11[0];
output = sibmei2.HasVisibleAccidental(note11);
assert.NotOK(output, 'The 3rd note in the 7th bar has a hidden C sharp');
// close the active score
CloseActiveScore();
} //$end
Expand Down
Binary file modified test/sibmeiTestSibs/accidentals.sib
Binary file not shown.

0 comments on commit 083c454

Please sign in to comment.