]> git.donarmstrong.com Git - lilypond.git/commitdiff
(stop_translation_timestep): only wipe
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 31 Aug 2006 23:26:46 +0000 (23:26 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 31 Aug 2006 23:26:46 +0000 (23:26 +0000)
heads_to_tie_ if there are new heads to tie.  Fixes polyphony in ties.

ChangeLog
lily/tie-engraver.cc

index 6d8ea29465b963720ab79ef19163d28cf209cdd0..ace0976c3fbc2396b6c4b54c3cbbf1584703515c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
+2006-09-01  Han-Wen Nienhuys  <hanwen@lilypond.org>
+
+       * lily/tie-engraver.cc (stop_translation_timestep): only wipe
+       heads_to_tie_ if there are new heads to tie.  Fixes polyphony in ties.
+
 2006-08-28  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
-       * lily/tie-engraver.cc (stop_translation_timestep): robustness for ambiti.
+       * lily/tie-engraver.cc (stop_translation_timestep): robustness for
+       ambituses.
 
        * lily/all-font-metrics.cc: remove TFM support.
 
index 11f534cdec8af2d792dbb205b55127420a979a19..f08e5e5d6c6faa952f668d446f7b154316cf468e 100644 (file)
@@ -181,8 +181,7 @@ Tie_engraver::stop_translation_timestep ()
       tie_column_ = 0;
     }
 
-  if (!wait)
-    heads_to_tie_.clear ();
+  vector<Head_event_tuple> new_heads_to_tie;
   
   for (vsize i = 0; i < now_heads_.size (); i++)
     {
@@ -236,10 +235,17 @@ Tie_engraver::stop_translation_timestep ()
            }
          event_tup.end_moment_ = end;
            
-         heads_to_tie_.push_back (event_tup);
+         new_heads_to_tie.push_back (event_tup);
        }
     }
 
+  if (!wait && new_heads_to_tie.size ())
+    heads_to_tie_.clear ();
+
+  // hmmm, how to do with copy() ?
+  for (vsize i = 0; i < new_heads_to_tie.size (); i++)
+    heads_to_tie_.push_back (new_heads_to_tie[i]);
+  
   event_ = 0;
   now_heads_.clear ();
 }