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.11.12-1~34 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=19a89e01b2fdab5ff6c9965f294f702f21bbe998;p=lilypond.git Avoid rebreaking pages on the second pass of a two-pass layout. Fixes #214 --- diff --git a/lily/axis-group-interface.cc b/lily/axis-group-interface.cc index e6b1e10f2c..23c3087247 100644 --- a/lily/axis-group-interface.cc +++ b/lily/axis-group-interface.cc @@ -185,6 +185,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 2f4876b044..e914b70326 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -531,7 +531,8 @@ the `parameters' assoc list.") #{ \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.