X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpage-turn-page-breaking.cc;h=e239cc2f2854f3a5b416e554541f50e9813658d5;hb=5b4b0d6e9a197e8f9eb085b7c2ad78b8be3e5cfc;hp=b818dc09a1cf85ad5b9f3c8408e7928cb64a700b;hpb=651887bf80f7d060457ef46a97341eec46688b44;p=lilypond.git diff --git a/lily/page-turn-page-breaking.cc b/lily/page-turn-page-breaking.cc index b818dc09a1..e239cc2f28 100644 --- a/lily/page-turn-page-breaking.cc +++ b/lily/page-turn-page-breaking.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 2006--2007 Joe Neeman + (c) 2006--2008 Joe Neeman */ #include "page-turn-page-breaking.hh" @@ -93,13 +93,13 @@ Page_turn_page_breaking::put_systems_on_pages (vsize start, return ret; } -/* "final page" meaning the number of the final right-hand page, - which always has an odd page number */ +/* The number of pages taken up by a Break_node, including + the blank page if there is one */ vsize -Page_turn_page_breaking::final_page_num (Break_node const &b) +Page_turn_page_breaking::total_page_count (Break_node const &b) { vsize end = b.first_page_number_ + b.page_count_; - return end - 1 + (end % 2); + return end - 1 + (end % 2) - b.first_page_number_; } extern bool debug_page_breaking_scoring; @@ -160,7 +160,7 @@ Page_turn_page_breaking::calc_subproblem (vsize ending_breakpoint) if (isinf (cur.demerits_) || (cur.page_count_ + (p_num % 2) > 2 && (!isinf (this_start_best.demerits_)) - && final_page_num (cur) > final_page_num (this_start_best))) + && total_page_count (cur) > total_page_count (this_start_best))) { ok_page = false; break;