]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/axis-group-interface.cc
codingstyle nits: space before ( and after ,
[lilypond.git] / lily / axis-group-interface.cc
index e6b1e10f2cac60a9f502a254436ae03fc9fe5f5a..bd53cbd2c3010fd123ceba132a98a146ec8cad27 100644 (file)
@@ -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<System*> (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);
 }
 
@@ -283,7 +294,7 @@ Axis_group_interface::calc_pure_elts_and_common (Grob *me)
   return common;
 }
 
-MAKE_SCHEME_CALLBACK(Axis_group_interface,calc_x_common, 1);
+MAKE_SCHEME_CALLBACK (Axis_group_interface, calc_x_common, 1);
 SCM
 Axis_group_interface::calc_x_common (SCM grob)
 {
@@ -294,7 +305,7 @@ Axis_group_interface::calc_x_common (SCM grob)
   return common->self_scm ();
 }
 
-MAKE_SCHEME_CALLBACK(Axis_group_interface,calc_y_common, 1);
+MAKE_SCHEME_CALLBACK (Axis_group_interface, calc_y_common, 1);
 SCM
 Axis_group_interface::calc_y_common (SCM grob)
 {