]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix corner case in min_page_count.
authorJoe Neeman <joeneeman@gmail.com>
Mon, 26 Mar 2007 01:30:16 +0000 (11:30 +1000)
committerJoe Neeman <joeneeman@gmail.com>
Mon, 26 Mar 2007 01:30:16 +0000 (11:30 +1000)
lily/page-breaking.cc

index 2646b24664973393f19e19451235c6341e4317ad..0adb963eeee8fea88e974d345886f2033ed21a0a 100644 (file)
@@ -571,7 +571,9 @@ Page_breaking::min_page_count (vsize configuration, vsize first_page_num)
 
   cur_page_height = page_height (first_page_num + ret - 1, true);
   Real cur_height = cur_rod_height + ((ragged_last () || ragged ()) ? cur_spring_height : 0);
-  if (cur_height > cur_page_height)
+  if (cur_height > cur_page_height
+      /* don't increase the page count if the last page had only one system */
+      && cur_rod_height > cached_line_details_.back ().extent_.length ())
     ret++;
   return ret;
 }