]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 3066: tie in TabStaff (using q) displays one of the unisone notes in a chord
authorDavid Kastrup <dak@gnu.org>
Fri, 3 Oct 2014 12:01:29 +0000 (14:01 +0200)
committerDavid Kastrup <dak@gnu.org>
Sun, 19 Oct 2014 08:56:40 +0000 (10:56 +0200)
This patch basically works by letting a note consume at most one tie
running into it.

It also tries to do a better job at matching potentially corresponding
notes when producing ties by not messing up match order when matching
ties to noteheads.

lily/tie-engraver.cc

index fa1617612a39b44531f946e045efdb7b7f0b24df..73fd6bfc91d69d53ddf499f9b355c311cfc50f3a 100644 (file)
@@ -151,7 +151,7 @@ Tie_engraver::acknowledge_note_head (Grob_info i)
   Grob *h = i.grob ();
 
   now_heads_.push_back (h);
-  for (vsize i = heads_to_tie_.size (); i--;)
+  for (vsize i = 0; i < heads_to_tie_.size (); i++)
     {
       Grob *th = heads_to_tie_[i].head_;
       Stream_event *right_ev = Stream_event::unsmob (h->get_property ("cause"));
@@ -202,6 +202,7 @@ Tie_engraver::acknowledge_note_head (Grob_info i)
               if (heads_to_tie_[j].end_moment_ == end)
                 heads_to_tie_[j].tie_from_chord_created = true;
             }
+          break;
         }
     }
 
@@ -209,7 +210,7 @@ Tie_engraver::acknowledge_note_head (Grob_info i)
     tie_column_ = make_spanner ("TieColumn", ties_[0]->self_scm ());
 
   if (tie_column_)
-    for (vsize i = ties_.size (); i--;)
+    for (vsize i = 0; i < ties_.size (); i++)
       Tie_column::add_tie (tie_column_, ties_[i]);
 }