]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix 1465.
authorJoe Neeman <joeneeman@gmail.com>
Sat, 1 Jan 2011 12:41:10 +0000 (19:41 +0700)
committerJoe Neeman <joeneeman@gmail.com>
Sat, 1 Jan 2011 12:41:10 +0000 (19:41 +0700)
Reverse the label-page-table so that larger page numbers will
appear when there is a duplicate label.

lily/page-breaking.cc

index 7e58ec42854b8a9629d725461e0a869347e352d5..e6a5740b2e10554ab89c06bf2374b53d603ce923 100644 (file)
@@ -529,6 +529,11 @@ Page_breaking::make_pages (vector<vsize> lines_per_page, SCM systems)
       ret = scm_cons (page, ret);
       --page_num;
     }
+
+  // By reversing the table, we ensure that duplicated labels (eg. those
+  // straddling a page turn) will appear in the table with their last
+  // occurence first.
+  label_page_table = scm_reverse_x (label_page_table, SCM_EOL);
   book_->top_paper ()->set_variable (ly_symbol2scm ("label-page-table"), label_page_table);
   return ret;
 }