]> git.donarmstrong.com Git - lilypond.git/commitdiff
page-layout: skip spacing spec for empty lines; issue 1669
authorKeith OHara <k-ohara5a5a@oco.net>
Mon, 6 May 2013 06:49:24 +0000 (23:49 -0700)
committerKeith OHara <k-ohara5a5a@oco.net>
Tue, 14 May 2013 05:29:23 +0000 (22:29 -0700)
input/regression/dynamics-empty.ly [new file with mode: 0644]
lily/page-layout-problem.cc

diff --git a/input/regression/dynamics-empty.ly b/input/regression/dynamics-empty.ly
new file mode 100644 (file)
index 0000000..4b06d96
--- /dev/null
@@ -0,0 +1,26 @@
+\version "2.17.18"
+
+\header {
+  texidoc = "An empty Dynamics context does not confuse the spacing."
+}
+
+\score {
+  \new PianoStaff <<
+    \new Dynamics { s1}
+    \new Dynamics { s2\f\> s4 s\!\p }
+    \new Staff {d'2 g''}
+    \new Dynamics { s1 }
+    \new Dynamics { s2\f\> s4 s\!\p }
+    \new Dynamics { s1 }
+    \new Staff {d'2 g''}
+    \new Dynamics { s1 }
+    \new Dynamics { s2\sustainOn s4 s\sustainOff }
+  >>
+  \layout {
+    \context {
+      \Dynamics
+      \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing
+        = #'((minimum-distance . 5))
+    }
+  }
+}
index 11177be03a461e4b736f7e06772380910237d01a..c3cd382d41bf491a02fdf0eb921f30631d33fdf3 100644 (file)
@@ -853,6 +853,9 @@ Page_layout_problem::find_system_offsets ()
                 }
               else // ! is_spaceable
                 {
+                  if (staff->extent (staff, Y_AXIS).is_empty ())
+                    continue;
+
                   if (loose_lines.empty ())
                     loose_lines.push_back (last_spaceable_line);