X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpage-turn-engraver.cc;h=deda4cc6b463bcc965b08e9d128af8d04c6e7754;hb=c77189ccaa4e645850ad61779de7a4c8f3fdbc6f;hp=4064efa37e2fd9f12921dfc8c5cab56df2f219c0;hpb=d8082113a0df616e7beabc0417c3590a3fac7320;p=lilypond.git diff --git a/lily/page-turn-engraver.cc b/lily/page-turn-engraver.cc index 4064efa37e..deda4cc6b4 100644 --- a/lily/page-turn-engraver.cc +++ b/lily/page-turn-engraver.cc @@ -1,9 +1,20 @@ /* - page-turn-engraver.cc -- implement Page_turn_engraver + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2006--2010 Joe Neeman - (c) 2006 Joe Neeman + 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" @@ -287,7 +298,7 @@ Page_turn_engraver::finalize () /* it's possible that the last of my newly-split events overlaps the next repeat_penalty, in which case we need to refilter that event */ - if (rep_index < repeat_penalties_.size () - 1 + if (rep_index + 1 < repeat_penalties_.size () && split.size () && split.back ().duration_[RIGHT] > repeat_penalties_[rep_index+1].duration_[LEFT]) { @@ -313,6 +324,9 @@ Page_turn_engraver::finalize () } } + /* unless a manual break overrides it, allow a page turn at the end of the piece */ + breakable_columns_.back ()->set_property ("page-turn-permission", ly_symbol2scm ("allow")); + /* apply the manual breaks */ for (vsize i = 0; i < forced_breaks_.size (); i++) { @@ -327,11 +341,18 @@ Page_turn_engraver::finalize () } ADD_ACKNOWLEDGER (Page_turn_engraver, note_head); + ADD_TRANSLATOR (Page_turn_engraver, - /* doc */ "Decide where page turns are allowed to go", - /* create */ "", + /* doc */ + "Decide where page turns are allowed to go.", + + /* create */ + "", + /* read */ "minimumPageTurnLength " "minimumRepeatLengthForPageTurn ", - /* write */ "" + + /* write */ + "" );