X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpage-spacing.cc;h=2c8a88a64bef942678f6f17cd8ffaf958e7d7e24;hb=e2fd43a13df7e8ce16e7528c8d5b6cc69aba78b8;hp=7e20f8416c5aa534983068a7987cfab5a85ec78e;hpb=dcd022fe1212a4a439539c22c1a8f90788e5d050;p=lilypond.git diff --git a/lily/page-spacing.cc b/lily/page-spacing.cc index 7e20f8416c..2c8a88a64b 100644 --- a/lily/page-spacing.cc +++ b/lily/page-spacing.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2006--2011 Joe Neeman + Copyright (C) 2006--2014 Joe Neeman LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -102,8 +102,8 @@ Page_spacing::account_for_footnotes (Line_details const &line) : 0.0)) + (footnote_height - - (has_footnotes_ - ? breaker_->footnote_padding () + breaker_->footnote_footer_padding () + + (has_footnotes_ + ? - breaker_->footnote_padding () + breaker_->footnote_footer_padding () : 0.0)); } @@ -155,6 +155,9 @@ Page_spacer::solve () } Page_spacing_result ret; + if (simple_state_.empty ()) + return ret; + ret.penalty_ = simple_state_.back ().penalty_ + lines_.back ().page_penalty_ + lines_.back ().turn_penalty_; ret.system_count_status_ = simple_state_.back ().system_count_status_; @@ -326,7 +329,7 @@ Page_spacer::calc_subproblem (vsize page, vsize line) space.prepend_system (lines_[page_start]); bool overfull = (space.rod_height_ > paper_height - || (ragged + || (ragged_ && (space.rod_height_ + space.spring_len_ > paper_height))); // This 'if' statement is a little hard to parse. It won't consider this configuration // if it is overfull unless the current configuration is the first one with this start