]> git.donarmstrong.com Git - lilypond.git/commitdiff
Don't print redundant flags in chords
authorDavid Nalesnik <david.nalesnik@gmail.com>
Mon, 24 Aug 2015 14:13:31 +0000 (09:13 -0500)
committerDavid Nalesnik <david.nalesnik@gmail.com>
Sat, 29 Aug 2015 12:57:18 +0000 (07:57 -0500)
This patch adds a check to lily/stem-engraver.cc which ensures that only
one Flag grob appears for a given Stem grob.  Previously, a flag was created
and printed for each note of a chord.

lily/stem-engraver.cc

index a84dd701bdd33a241d0df33e34969bb1139a8de0..2f2eaf82daedf380d0b53cd1505be4ff1ca9016f 100644 (file)
@@ -158,7 +158,8 @@ Stem_engraver::acknowledge_rhythmic_head (Grob_info gi)
   Stem::add_head (stem_, gi.grob ());
 
   if (Stem::is_normal_stem (stem_)
-      && Stem::duration_log (stem_) > 2)
+      && Stem::duration_log (stem_) > 2
+      && !(unsmob<Grob> (stem_->get_object ("flag"))))
     {
       Item *flag = make_item ("Flag", stem_->self_scm ());
       flag->set_parent (stem_, X_AXIS);