]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4881: Axis_group_engraver: add interesting items only once
authorDavid Kastrup <dak@gnu.org>
Sun, 5 Jun 2016 11:28:49 +0000 (13:28 +0200)
committerDavid Kastrup <dak@gnu.org>
Sun, 12 Jun 2016 11:12:50 +0000 (13:12 +0200)
lily/axis-group-engraver.cc

index 2bc4858479898f905cc3799aba21074a2111038a..2a5f71e275cc15f30309ed0d141f0471fabb7882 100644 (file)
@@ -116,15 +116,20 @@ Axis_group_engraver::finalize ()
 void
 Axis_group_engraver::acknowledge_grob (Grob_info i)
 {
-  if (staffline_)
-    elts_.push_back (i.grob ());
+  if (!staffline_)
+    return;
+
+  elts_.push_back (i.grob ());
 
-  if (staffline_ && to_boolean(staffline_->get_property("remove-empty")))
+  if (to_boolean (staffline_->get_property ("remove-empty")))
     {
       for (SCM s = interesting_; scm_is_pair (s); s = scm_cdr (s))
         {
           if (i.grob ()->internal_has_interface (scm_car (s)))
-            Hara_kiri_group_spanner::add_interesting_item (staffline_, i.grob ());
+            {
+              Hara_kiri_group_spanner::add_interesting_item (staffline_, i.grob ());
+              break;
+            }
         }
     }
 }