From: Han-Wen Nienhuys Date: Wed, 27 Aug 2003 09:40:02 +0000 (+0000) Subject: (stop_translation_timestep): only flush X-Git-Tag: release/1.9.2~14 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6d73c34ae1b5c281b0fa3ba3a5c775d44140f620;p=lilypond.git (stop_translation_timestep): only flush tied_notes when we have actually made a tie. Fixes bugs with ties in polyphonic scores. --- diff --git a/ChangeLog b/ChangeLog index cb74e7580e..1e37927b4c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-08-27 Han-Wen Nienhuys + + * lily/tie-performer.cc (stop_translation_timestep): only flush + tied_notes when we have actually made a tie. Fixes bugs with ties + in polyphonic scores. + 2003-08-26 Jan Nieuwenhuizen * stepmake/autogen.sh: Bugfix: copy aclocal.m4, autogen.sh also if diff --git a/VERSION b/VERSION index d148e35d90..41e5a00ffe 100644 --- a/VERSION +++ b/VERSION @@ -1,7 +1,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=9 -PATCH_LEVEL=1 +PATCH_LEVEL=2 MY_PATCH_LEVEL= # Use the above to send patches: MY_PATCH_LEVEL is always empty for a diff --git a/lily/tie-performer.cc b/lily/tie-performer.cc index 74dfcb8025..3ca52b6c49 100644 --- a/lily/tie-performer.cc +++ b/lily/tie-performer.cc @@ -41,8 +41,8 @@ class Tie_performer : public Performer public: TRANSLATOR_DECLARATIONS(Tie_performer); private: - bool done_; - + + bool ties_created_; Array now_notes_; Array tied_notes_; @@ -64,7 +64,7 @@ protected: Tie_performer::Tie_performer () { event_ = 0; - done_ = false; + ties_created_ = false; } ENTER_DESCRIPTION (Tie_performer, "", "", @@ -129,6 +129,7 @@ Tie_performer::create_audio_elements () p->set_note (RIGHT, now_notes_[j].note_); ties_.push (p); announce_element (Audio_element_info (p, event_)); + ties_created_ = true; tied_notes_.del (i); break ; @@ -142,22 +143,23 @@ Tie_performer::create_audio_elements () void Tie_performer::stop_translation_timestep () { - if (prev_event_ && tied_notes_.size () && !ties_.size ()) + if (prev_event_ && tied_notes_.size () && !ties_.size () + && now_notes_.size ()) { prev_event_->origin ()->warning (_ ("No ties were performed.")); } - else - prev_event_ = 0; + + if (ties_created_) + { + prev_event_ = 0; + tied_notes_.clear(); + } if (event_) { tied_notes_ = now_notes_ ; prev_event_ = event_; } - else - { - tied_notes_.clear (); - } event_ = 0; now_notes_ .clear (); @@ -174,7 +176,7 @@ void Tie_performer::start_translation_timestep () { event_ =0; - done_ = false; + ties_created_ = false; Moment now = now_mom (); for (int i= tied_notes_.size (); i-- ;) {