From 76f060825126f528cdadd56fb88b47fdb3d9560d Mon Sep 17 00:00:00 2001 From: Joe Neeman Date: Tue, 12 May 2009 15:52:14 -0700 Subject: [PATCH] Fix a bug that left empty space on pages with titles. --- lily/page-spacing.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lily/page-spacing.cc b/lily/page-spacing.cc index 3eb7c8f4a0..c236c94e88 100644 --- a/lily/page-spacing.cc +++ b/lily/page-spacing.cc @@ -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; -- 2.39.2