From 9e6c934b15e0bbcc2f2f250d5a5b6e17ea88a22d Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sun, 5 Jun 2016 13:28:49 +0200 Subject: [PATCH] Issue 4881: Axis_group_engraver: add interesting items only once --- lily/axis-group-engraver.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lily/axis-group-engraver.cc b/lily/axis-group-engraver.cc index 2bc4858479..2a5f71e275 100644 --- a/lily/axis-group-engraver.cc +++ b/lily/axis-group-engraver.cc @@ -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; + } } } } -- 2.39.2