From 897b3ba501c80ccf0d1fc4e65c70a9dc979c3e12 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 31 Aug 2006 23:26:46 +0000 Subject: [PATCH] (stop_translation_timestep): only wipe heads_to_tie_ if there are new heads to tie. Fixes polyphony in ties. --- ChangeLog | 8 +++++++- lily/tie-engraver.cc | 12 +++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6d8ea29465..ace0976c3f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ +2006-09-01 Han-Wen Nienhuys + + * 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 - * 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. diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc index 11f534cdec..f08e5e5d6c 100644 --- a/lily/tie-engraver.cc +++ b/lily/tie-engraver.cc @@ -181,8 +181,7 @@ Tie_engraver::stop_translation_timestep () tie_column_ = 0; } - if (!wait) - heads_to_tie_.clear (); + vector 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 (); } -- 2.39.5