From: Rune Zedeler Date: Mon, 18 Dec 2006 11:44:56 +0000 (+0100) Subject: Fix #106 and problems with 'modern accidental style. X-Git-Tag: release/2.11.3-1~11 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=520362dfc7d3864a52caf50ce7d9068375e018e1;p=lilypond.git Fix #106 and problems with 'modern accidental style. --- diff --git a/input/regression/accidentals-modern.ly b/input/regression/accidentals-modern.ly new file mode 100644 index 0000000000..9f749aed2c --- /dev/null +++ b/input/regression/accidentals-modern.ly @@ -0,0 +1,16 @@ +\header { + + texidoc = "In 'modern accidental style, the last note should +have an accidental sign. " + +} +\version "2.10.3" + +\score { + \new Staff { + \relative c' { + #(set-accidental-style 'modern) + d4 dis'4 d,2^"this should have accidental" + } + } +} diff --git a/lily/accidental-engraver.cc b/lily/accidental-engraver.cc index 9d671c11e6..00cf1de97e 100644 --- a/lily/accidental-engraver.cc +++ b/lily/accidental-engraver.cc @@ -122,8 +122,7 @@ Accidental_engraver::update_local_key_signature () /* Huh. Don't understand what this is good for. --hwn. */ - SCM val; - while (trans && trans->where_defined (ly_symbol2scm ("localKeySignature"), &val)) + while (trans) { trans->set_property ("localKeySignature", ly_deep_copy (last_keysig_)); trans = trans->get_parent_context (); @@ -193,11 +192,14 @@ number_accidentals_from_sig (bool *different, SCM sig, Pitch *pitch, { SCM entry = scm_car (s); if (scm_is_pair (scm_car (entry)) - && scm_cdar (entry) == scm_from_int (n)) + && scm_cdar (entry) == scm_from_int (n)) { from_other_octaves = scm_cdr (entry); + break; + } } - if (from_same_octave != SCM_BOOL_F + if (!ignore_octave + && from_same_octave != SCM_BOOL_F && recent_enough (bar_number, from_same_octave, laziness)) previous_alteration = from_same_octave; else if (ignore_octave