]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/axis-group-engraver.cc
lilypond-manuals.css: edit color scheme and some spacing
[lilypond.git] / lily / axis-group-engraver.cc
index 2bc4858479898f905cc3799aba21074a2111038a..d500c6ba64fea97a2f96e362143137ecd01a429e 100644 (file)
@@ -55,7 +55,8 @@ public:
 };
 
 
-Axis_group_engraver::Axis_group_engraver ()
+Axis_group_engraver::Axis_group_engraver (Context *c)
+  : Engraver (c)
 {
   staffline_ = 0;
   interesting_ = SCM_EOL;
@@ -116,15 +117,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;
+            }
         }
     }
 }