]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix 790.
authorJoe Neeman <joeneeman@gmail.com>
Thu, 12 Nov 2009 23:53:36 +0000 (15:53 -0800)
committerJoe Neeman <joeneeman@gmail.com>
Fri, 13 Nov 2009 00:23:31 +0000 (16:23 -0800)
Use the min distance between loose lines, not the min distance
between a loose line and the previous staff.

input/regression/page-spacing-loose-lines-between-systems.ly [new file with mode: 0644]
lily/page-layout-problem.cc

diff --git a/input/regression/page-spacing-loose-lines-between-systems.ly b/input/regression/page-spacing-loose-lines-between-systems.ly
new file mode 100644 (file)
index 0000000..84142c1
--- /dev/null
@@ -0,0 +1,23 @@
+\version "2.13.7"
+
+\header {
+  texidoc = "The vertical spacing engine is not confused by
+a loose line below a system followed by a loose line above
+the next system."
+}
+
+\paper {
+  indent = 0
+  ragged-right = ##t
+}
+
+\book {
+  \score {
+    <<
+      \chords { s1 \break d1 }
+      \relative c { c1 c1 }
+      \addlyrics { word }
+    >>
+  }
+}
+
index 29025ba7969749e0c7d5a23b77a461a84b85b7c4..5e8d6a70e072f479812ecf81699c69257b44d243 100644 (file)
@@ -395,14 +395,13 @@ Page_layout_problem::find_system_offsets ()
                  if (loose_lines.empty ())
                    loose_lines.push_back (last_spaceable_line);
 
-                 loose_lines.push_back (staff);
                  if (staff_idx)
                    loose_line_min_distances.push_back (min_offsets[staff_idx-1] - min_offsets[staff_idx]);
                  else
                    {
                      Real min_dist = 0;
-                     if (last_spaceable_line)
-                       min_dist = Axis_group_interface::minimum_distance (last_spaceable_line,
+                     if (loose_lines.back ())
+                       min_dist = Axis_group_interface::minimum_distance (loose_lines.back (),
                                                                           staff,
                                                                           Y_AXIS);
                      else // distance to the top margin
@@ -410,6 +409,7 @@ Page_layout_problem::find_system_offsets ()
 
                      loose_line_min_distances.push_back (min_dist);
                    }
+                 loose_lines.push_back (staff);
                }
            }