]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix a bug that left empty space on pages with titles.
authorJoe Neeman <joeneeman@gmail.com>
Tue, 12 May 2009 22:52:14 +0000 (15:52 -0700)
committerJoe Neeman <joeneeman@gmail.com>
Thu, 14 May 2009 19:59:19 +0000 (12:59 -0700)
lily/page-spacing.cc

index 3eb7c8f4a067345e836ba562bea90d2486b8bf87..c236c94e88936193defac0c3f5ffa6631901503f 100644 (file)
@@ -16,8 +16,9 @@
 void
 Page_spacing::calc_force ()
 {
-  /* If the first system is a title, we add back in the page-top-space. */
-  Real height = first_line_.title_ ? page_height_ + page_top_space_ : page_height_;
+  /* If the first system contains a title, we add back in the page-top-space. */
+  bool starts_with_title = first_line_.compressed_nontitle_lines_count_ < first_line_.compressed_lines_count_;
+  Real height = starts_with_title ? page_height_ + page_top_space_ : page_height_;
 
   if (rod_height_ + last_line_.bottom_padding_ >= height)
     force_ = infinity_f;