]> git.donarmstrong.com Git - lilypond.git/commitdiff
(stop_translation_timestep): only flush
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 27 Aug 2003 09:40:02 +0000 (09:40 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 27 Aug 2003 09:40:02 +0000 (09:40 +0000)
tied_notes when we have actually made a tie. Fixes bugs with ties
in polyphonic scores.

ChangeLog
VERSION
lily/tie-performer.cc

index cb74e7580ec5b0b0411e8fb982cf0935b5c5fa71..1e37927b4ca57ed037fd3955944a6b48a34d80b3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-08-27  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * 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  <janneke@gnu.org>
 
        * stepmake/autogen.sh: Bugfix: copy aclocal.m4, autogen.sh also if
diff --git a/VERSION b/VERSION
index d148e35d905675d605c94c22ab7befb4c134c412..41e5a00ffe19097383d08915c9d0c1c74a449e95 100644 (file)
--- 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
index 74dfcb8025ba3348fc8a249691c804ca1967e331..3ca52b6c4920b9c42d8306b8719fca40ada12ac5 100644 (file)
@@ -41,8 +41,8 @@ class Tie_performer : public Performer
 public:
   TRANSLATOR_DECLARATIONS(Tie_performer);
 private:
-  bool done_;
-  
+
+  bool ties_created_;
   Array<CNote_melodic_tuple> now_notes_;
   Array<CNote_melodic_tuple> 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-- ;)
     {