]> git.donarmstrong.com Git - lilypond.git/commitdiff
Avoid rebreaking pages on the second pass of a two-pass layout.
authorJoe Neeman <joeneeman@gmail.com>
Mon, 15 Jan 2007 06:12:36 +0000 (08:12 +0200)
committerJoe Neeman <joeneeman@gmail.com>
Mon, 15 Jan 2007 06:12:36 +0000 (08:12 +0200)
Fixes #214

lily/axis-group-interface.cc
ly/music-functions-init.ly

index e6b1e10f2cac60a9f502a254436ae03fc9fe5f5a..23c30872474d31267c92d093122dd1be452d6a1b 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);
 }
 
index 2f4876b044e35c5840e337fcb7cb709ee9e9c36d..e914b70326435296f9968343badc6d16fa7f3b78 100644 (file)
@@ -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.