X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fbreak-align-engraver.cc;h=1013ac6e7be4b9a2b164f76dfd7e6c62f1a87145;hb=9e781b7dc83b60a543ce218aa1a5f139f74c760f;hp=155f34d9bc0acba3287d967b3a989b5776a88b9b;hpb=5b4b0d6e9a197e8f9eb085b7c2ad78b8be3e5cfc;p=lilypond.git diff --git a/lily/break-align-engraver.cc b/lily/break-align-engraver.cc index 155f34d9bc..1013ac6e7b 100644 --- a/lily/break-align-engraver.cc +++ b/lily/break-align-engraver.cc @@ -1,9 +1,20 @@ /* - break-align-engraver.cc -- implement Break_align_engraver + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 1999--2014 Han-Wen Nienhuys - (c) 1999--2008 Han-Wen Nienhuys + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "engraver.hh" #include "protected-scm.hh" @@ -58,6 +69,13 @@ Break_align_engraver::derived_mark () const void Break_align_engraver::acknowledge_break_alignable (Grob_info inf) { + /* + Special case for MetronomeMark: filter out items which will be aligned + on note heads rather than prefatory material + */ + if (!Item::is_non_musical (inf.item ())) + return; + if (!align_) create_alignment (inf); @@ -73,20 +91,20 @@ Break_align_engraver::acknowledge_break_aligned (Grob_info inf) if (Item *item = dynamic_cast (inf.grob ())) { /* - Removed check for item->empty (X_AXIS). --hwn 20/1/04 + Removed check for item->empty (X_AXIS). --hwn 20/1/04 */ if (item->get_parent (X_AXIS)) - return; + return; if (!Item::is_non_musical (item)) - return; + return; SCM align_name = item->get_property ("break-align-symbol"); if (!scm_is_symbol (align_name)) - return; - + return; + if (!align_) - create_alignment (inf); + create_alignment (inf); add_to_group (align_name, item); } @@ -109,7 +127,7 @@ Break_align_engraver::create_alignment (Grob_info inf) */ left_edge_ = random_source->make_item ("LeftEdge", SCM_EOL); add_to_group (left_edge_->get_property ("break-align-symbol"), - left_edge_); + left_edge_); } void @@ -140,20 +158,20 @@ Break_align_engraver::add_to_group (SCM align_name, Item *item) ADD_ACKNOWLEDGER (Break_align_engraver, break_aligned); ADD_ACKNOWLEDGER (Break_align_engraver, break_alignable); ADD_TRANSLATOR (Break_align_engraver, - /* doc */ - "Align grobs with corresponding @code{break-align-symbols}" - " into groups, and order the groups according to" - " @code{breakAlignOrder}. The left edge of the alignment gets" - " a separate group, with a symbol @code{left-edge}.", - - /* create */ - "BreakAlignment " - "BreakAlignGroup " - "LeftEdge ", - - /* read */ - "", - - /* write */ - "" - ); + /* doc */ + "Align grobs with corresponding @code{break-align-symbols}" + " into groups, and order the groups according to" + " @code{breakAlignOrder}. The left edge of the alignment gets" + " a separate group, with a symbol @code{left-edge}.", + + /* create */ + "BreakAlignment " + "BreakAlignGroup " + "LeftEdge ", + + /* read */ + "", + + /* write */ + "" + );