]> git.donarmstrong.com Git - lilypond.git/commitdiff
tie_performer: Remove start heads, for which the tie has been created.
authorReinhold Kainhofer <reinhold@kainhofer.com>
Tue, 17 Nov 2009 16:52:01 +0000 (17:52 +0100)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Fri, 20 Nov 2009 15:49:37 +0000 (16:49 +0100)
This avoids clearing the list of waiting heads (which will be needed if tieWaitForNote is set

lily/tie-performer.cc

index 0d60c758cbf174f81ddacab6ff8572c78fda7111..35d52ce0d4ed19ed9d9e842c7b501953fd1d6342 100644 (file)
@@ -77,8 +77,11 @@ Tie_performer::acknowledge_audio_element (Audio_element_info inf)
              && ly_is_equal (right_mus->get_property ("pitch"),
                              left_mus->get_property ("pitch")))
            {
+             found = true;
              an->tie_to (th);
              ties_created_ = true;
+             // this invalidates the iterator, we are leaving the loop anyway
+             heads_to_tie_.erase (it);
            }
        }
     }
@@ -96,7 +99,7 @@ Tie_performer::stop_translation_timestep ()
 {
   // We might have dangling open ties like c~ d. Close them, unless we have
   // tieWaitForNote set...
-  if (ties_created_ || !to_boolean (get_property ("tieWaitForNote")))
+  if (!to_boolean (get_property ("tieWaitForNote")))
     {
       heads_to_tie_.clear ();
       ties_created_ = false;