]> git.donarmstrong.com Git - lilypond.git/commitdiff
(stop_translation_timestep): move
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 20 Feb 2004 00:38:22 +0000 (00:38 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 20 Feb 2004 00:38:22 +0000 (00:38 +0000)
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.

ChangeLog
lily/accidental-engraver.cc

index 95c459137cef471a6761dab702e3693ae44e499e..a9acbd35e832d0e48db0180536e079ca153c1870 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2004-02-20  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * 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
index 7e160184c3b37b2aaa75a2bccdec77a91429ce44..2b44ea3f51f7a6fc85e2deac30880e8c60147170 100644 (file)
@@ -62,9 +62,6 @@ public:
 
   Grob * accidental_placement_;
 
-  /*
-    The next 
-   */
   Array<Accidental_entry> accidentals_;
   Link_array<Spanner> 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 ();