X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fkey-engraver.cc;h=971f55317295e8a56387a6f508dc8a41f20cd96a;hb=0da72b011d1de5f777941e6dd333be74b428f4a6;hp=9f77135ede686dd70be1161fa7a0a00d51bf805f;hpb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;p=lilypond.git diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index 9f77135ede..971f553172 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -82,7 +82,7 @@ Key_engraver::create_key (bool is_default) SCM key = get_property ("keyAlterations"); if ((to_boolean (get_property ("printKeyCancellation")) - || key == SCM_EOL) + || scm_is_null (key)) && !scm_is_eq (last, key)) { SCM restore = SCM_EOL; @@ -90,7 +90,7 @@ Key_engraver::create_key (bool is_default) { SCM new_alter_pair = scm_assoc (scm_caar (s), key); Rational old_alter = robust_scm2rational (scm_cdar (s), 0); - if (new_alter_pair == SCM_BOOL_F + if (scm_is_false (new_alter_pair) || ((ly_scm2rational (scm_cdr (new_alter_pair)) - old_alter) * old_alter < Rational (0))) { @@ -140,8 +140,7 @@ Key_engraver::acknowledge_clef (Grob_info /* info */) void Key_engraver::acknowledge_bar_line (Grob_info /* info */) { - if (scm_is_pair (get_property ("keyAlterations"))) - create_key (true); + create_key (true); } void