From: Joe Neeman Date: Mon, 15 Jan 2007 06:12:36 +0000 (+0200) Subject: Avoid rebreaking pages on the second pass of a two-pass layout. X-Git-Tag: release/2.10.12-1~10^2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8f8cbeab436a86a2da7c16582ca1f727e6a48924;p=lilypond.git Avoid rebreaking pages on the second pass of a two-pass layout. Fixes #214 (cherry picked from 18b6d30f7b51a91b1f75e1e2b952ca3cd349d1a4 commit) --- diff --git a/lily/axis-group-interface.cc b/lily/axis-group-interface.cc index b2cf02a68c..6243d97f65 100644 --- a/lily/axis-group-interface.cc +++ b/lily/axis-group-interface.cc @@ -175,6 +175,17 @@ Axis_group_interface::pure_height (SCM smob, SCM start_scm, SCM end_scm) int end = robust_scm2int (end_scm, INT_MAX); Grob *me = unsmob_grob (smob); + /* Maybe we are in the second pass of a two-pass spacing run. In that + case, the Y-extent of a system is already given to us */ + System *system = dynamic_cast (me); + if (system) + { + SCM line_break_details = system->column (start)->get_property ("line-break-system-details"); + SCM system_y_extent = scm_assq (ly_symbol2scm ("system-Y-extent"), line_break_details); + if (scm_is_pair (system_y_extent)) + return scm_cdr (system_y_extent); + } + return pure_group_height (me, start, end); } diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index fa18af6ce7..2d2033443d 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -532,7 +532,8 @@ spacingTweaks = #{ \overrideProperty #"Score.NonMusicalPaperColumn" #'line-break-system-details - #$(list (cons 'alignment-extra-space (cdr (assoc 'system-stretch parameters)))) + #$(list (cons 'alignment-extra-space (cdr (assoc 'system-stretch parameters))) + (cons 'system-Y-extent (cdr (assoc 'system-Y-extent parameters)))) #}) %% Parser used to read page-layout file, and then retreive score tweaks.