From 8f8cbeab436a86a2da7c16582ca1f727e6a48924 Mon Sep 17 00:00:00 2001 From: Joe Neeman Date: Mon, 15 Jan 2007 08:12:36 +0200 Subject: [PATCH] Avoid rebreaking pages on the second pass of a two-pass layout. Fixes #214 (cherry picked from 18b6d30f7b51a91b1f75e1e2b952ca3cd349d1a4 commit) --- lily/axis-group-interface.cc | 11 +++++++++++ ly/music-functions-init.ly | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) 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. -- 2.39.5