From: Han-Wen Nienhuys Date: Fri, 20 Feb 2004 00:38:22 +0000 (+0000) Subject: (stop_translation_timestep): move X-Git-Tag: release/2.1.26~14 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=9dac1303687586a4521129ca064d5316ba714eab;p=lilypond.git (stop_translation_timestep): move update of localKeySignature to stop_translation_timestep (). This makes sure that all ties are noticed at the right moment. (stop_translation_timestep): clear tie only when right-side notehead was seen. (number_accidentals_from_sig): cleanup. --- diff --git a/ChangeLog b/ChangeLog index 95c459137c..a9acbd35e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2004-02-20 Han-Wen Nienhuys + * lily/accidental-engraver.cc (stop_translation_timestep): move + update of localKeySignature to stop_translation_timestep (). This + makes sure that all ties are noticed at the right moment. + (stop_translation_timestep): clear tie only when right-side + notehead was seen. + (number_accidentals_from_sig): cleanup. + * input/regression/accidental-tie.ly (mus): new file * input/regression/tie-accidental, tie-break-accidental.ly: remove diff --git a/lily/accidental-engraver.cc b/lily/accidental-engraver.cc index 7e160184c3..2b44ea3f51 100644 --- a/lily/accidental-engraver.cc +++ b/lily/accidental-engraver.cc @@ -62,9 +62,6 @@ public: Grob * accidental_placement_; - /* - The next - */ Array accidentals_; Link_array ties_; @@ -110,7 +107,6 @@ Accidental_engraver::initialize () sig (passed as argument) Returns number of accidentals (0, 1 or 2). - Negative (-1 or -2) if accidental has changed. */ static int @@ -222,17 +218,15 @@ number_accidentals (bool *different, SCM Accidental_engraver::get_bar_num () { - SCM barnum = get_property ("currentBarNumber"); - SCM smp = get_property("measurePosition"); + SCM barnum = get_property ("currentBarNumber"); + SCM smp = get_property("measurePosition"); - Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0); - if (mp.main_part_ < Rational (0) - && gh_number_p (barnum)) - barnum = scm_int2num (gh_scm2int (barnum) - 1); + Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0); + if (mp.main_part_ < Rational (0) + && gh_number_p (barnum)) + barnum = scm_int2num (gh_scm2int (barnum) - 1); - - return barnum ; - + return barnum ; } void @@ -240,7 +234,6 @@ Accidental_engraver::process_acknowledged_grobs () { if (accidentals_.size () && !accidentals_.top().done_) { - //SCM localsig = get_property ("localKeySignature"); SCM accidentals = get_property ("autoAccidentals"); SCM cautionaries = get_property ("autoCautionaries"); SCM barnum = get_bar_num (); @@ -286,18 +279,7 @@ Accidental_engraver::process_acknowledged_grobs () Can not look for ties: it's not guaranteed that they reach us before the notes */ - /* See if there's a tie that makes the accidental disappear */ - Grob *tie_break_reminder = 0; - bool tie_changes = false; - for (int j = 0; j < ties_.size (); j++) - if (support == Tie::head (ties_[j], RIGHT)) - { - tie_changes = different; - if (different) - tie_break_reminder = ties_[j]; - break; - } - + if (num) { /* @@ -333,12 +315,6 @@ Accidental_engraver::process_acknowledged_grobs () a->set_grob_property ("cautionary", SCM_BOOL_T); } - if (tie_break_reminder) - { - // TODO. - a->set_grob_property ("tie", tie_break_reminder->self_scm()); - } - support->set_grob_property ("accidental-grob", a->self_scm ()); @@ -447,7 +423,8 @@ Accidental_engraver::stop_translation_timestep () if (accidental_placement_) typeset_grob(accidental_placement_); - accidental_placement_ = 00; + + accidental_placement_ = 0; accidentals_.clear(); left_objects_.clear ();