X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpitched-trill-engraver.cc;h=39cb899acc6b3b0e257082fe9c253d99fb9f6eef;hb=edf17353d89f4f6bd831466262402bb9151a26ca;hp=3104b48ce02b1ba3ad1b0224eb5de04edf2c3d79;hpb=2909349bdbefbf880fa9c8c47ba2eddf9f9855ca;p=lilypond.git diff --git a/lily/pitched-trill-engraver.cc b/lily/pitched-trill-engraver.cc index 3104b48ce0..39cb899acc 100644 --- a/lily/pitched-trill-engraver.cc +++ b/lily/pitched-trill-engraver.cc @@ -80,9 +80,22 @@ Pitched_trill_engraver::make_trill (Stream_event *ev) SCM key = scm_cons (scm_from_int (p->get_octave ()), scm_from_int (p->get_notename ())); + int bn = measure_number (context()); + SCM handle = scm_assoc (key, keysig); + if (handle != SCM_BOOL_F) + { + bool same_bar = (bn == robust_scm2int (scm_cddr (handle), 0)); + bool same_alt + = (p->get_alteration () == robust_scm2rational (scm_cadr (handle), 0)); + + if (!same_bar || (same_bar && !same_alt)) + handle = SCM_BOOL_F; + } + bool print_acc - = (handle == SCM_BOOL_F) || p->get_alteration () == Rational (0); + = (handle == SCM_BOOL_F) || p->get_alteration () == Rational (0) + || (ev->get_property ("force-accidental") == SCM_BOOL_T); if (trill_head_) {