X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpitched-trill-engraver.cc;h=18482faabd4569f5b0b1ce40e13b950e00287153;hb=5be4c57cff4ebd477b2b3d0899d6725794da77f0;hp=3104b48ce02b1ba3ad1b0224eb5de04edf2c3d79;hpb=ac6c83f047635535d0481a15654c13e776334dc6;p=lilypond.git diff --git a/lily/pitched-trill-engraver.cc b/lily/pitched-trill-engraver.cc index 3104b48ce0..18482faabd 100644 --- a/lily/pitched-trill-engraver.cc +++ b/lily/pitched-trill-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 2005--2007 Han-Wen Nienhuys + (c) 2005--2009 Han-Wen Nienhuys */ #include "engraver.hh" @@ -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_caddr (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_) {