]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix a ragged-bottom/ragged-last-bottom corner case.
authorJoe Neeman <joeneeman@gmail.com>
Fri, 14 Nov 2008 19:40:03 +0000 (11:40 -0800)
committerJoe Neeman <joeneeman@gmail.com>
Fri, 14 Nov 2008 19:40:03 +0000 (11:40 -0800)
When using ragged spacing, we want to pretend that the last page
requires no force (so that we don't worsen the spacing of the
previous pages in order to fill the last page). The previous check
for this only worked if ragged-last-bottom = ##t, but not if
ragged-bottom = ##t and ragged-last-bottom ##f.

lily/optimal-page-breaking.cc
lily/page-spacing.cc

index 3c26c9abe08c5d15ac932cd4f2ed7f025f6a19f2..b45781fd0a7fc0b0c459a0a3acc1cdc6a9f7604e 100644 (file)
@@ -63,6 +63,8 @@ Optimal_page_breaking::solve ()
   
       if (page_count > 1 && best.systems_per_page_[page_count - 2] > 1)
        min_sys_count -= best.systems_per_page_[page_count - 2];
+
+      min_sys_count = max (min_sys_count, (vsize)1);
     }
   else
     {
index 19129b3c175a0024dc157aebdcee31b8034e52a7..78ad9a842a6561e2df7c02438b5089ab52ee57ab 100644 (file)
@@ -204,7 +204,7 @@ Page_spacer::calc_subproblem (vsize page, vsize line)
 
       if (page > 0 || page_start == 0)
        {
-         if (line == lines_.size () - 1 && ragged_last_ && space.force_ > 0)
+         if (line == lines_.size () - 1 && ragged && last && space.force_ > 0)
            space.force_ = 0;
 
          /* we may have to deal with single lines that are taller than a page */