X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpage-turn-engraver.cc;h=e5055f1da28bbafc8b510b8e0f22793910388bf8;hb=5b4b0d6e9a197e8f9eb085b7c2ad78b8be3e5cfc;hp=c2817479d3d9c586c6793cffdbb4364bb8ad079e;hpb=f00f6f9ca6642e34075252e5675bf174c0575496;p=lilypond.git diff --git a/lily/page-turn-engraver.cc b/lily/page-turn-engraver.cc index c2817479d3..e5055f1da2 100644 --- a/lily/page-turn-engraver.cc +++ b/lily/page-turn-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 2006 Joe Neeman + (c) 2006--2008 Joe Neeman */ #include "engraver.hh" @@ -12,7 +12,6 @@ #include "duration.hh" #include "grob.hh" #include "international.hh" -#include "moment.hh" #include "paper-column.hh" #include "stream-event.hh" #include "warn.hh" @@ -288,7 +287,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]) { @@ -314,6 +313,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++) { @@ -328,11 +330,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 */ + "" );