]> git.donarmstrong.com Git - lilypond.git/commitdiff
Reduce interactions between staves during note-spacing; issue 2058
authorKeith OHara <k-ohara5a5a@oco.net>
Sat, 5 Nov 2011 07:16:28 +0000 (00:16 -0700)
committerKeith OHara <k-ohara5a5a@oco.net>
Fri, 9 Dec 2011 05:18:57 +0000 (21:18 -0800)
Build the skylines for note-spacing at desired distance, not mininmum
distance

lily/align-interface.cc

index fb1ccf8a219df5742c7420de37dff780354533a6..f4884faa6baadee746655cb804ba411e318f748e 100644 (file)
@@ -167,7 +167,7 @@ Align_interface::get_minimum_translations_without_min_dist (Grob *me,
 }
 
 // If include_fixed_spacing is false, the only constraints that will be measured
-// here are those that result from collisions (+ padding) and minimum-distance
+// here are those that result from collisions (+ padding) and the spacing spec
 // between adjacent staves.
 // If include_fixed_spacing is true, constraints from line-break-system-details,
 // basic-distance+stretchable=0, and staff-staff-spacing of spaceable staves
@@ -221,9 +221,13 @@ Align_interface::internal_get_minimum_translations (Grob *me,
 
           dy = down_skyline.distance (skylines[j][-stacking_dir]) + padding;
 
-          Real min_distance = 0;
-          if (Page_layout_problem::read_spacing_spec (spec, &min_distance, ly_symbol2scm ("minimum-distance")))
-            dy = max (dy, min_distance);
+          Real spec_distance = 0;
+          if (Page_layout_problem::read_spacing_spec (spec, &spec_distance, ly_symbol2scm ("minimum-distance")))
+            dy = max (dy, spec_distance);
+          // Consider the likely final spacing when estimating distance between staves of the full score
+          if (INT_MAX == end && 0 == start
+              && Page_layout_problem::read_spacing_spec (spec, &spec_distance, ly_symbol2scm ("basic-distance")))
+            dy = max (dy, spec_distance);
 
           if (include_fixed_spacing && Page_layout_problem::is_spaceable (elems[j]) && last_spaceable_element)
             {
@@ -308,7 +312,6 @@ Align_interface::align_elements_to_minimum_distances (Grob *me, Axis a)
       all_grobs[j]->translate_axis (translates[j], a);
 }
 
-
 MAKE_SCHEME_CALLBACK (Align_interface, full_score_pure_minimum_translations, 1);
 SCM
 Align_interface::full_score_pure_minimum_translations (SCM smob)