From: Keith OHara Date: Mon, 6 May 2013 06:49:24 +0000 (-0700) Subject: page-layout: skip spacing spec for empty lines; issue 1669 X-Git-Tag: release/2.17.19-1~8^2~19 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=492a7326057fec726684ef429763c745e9ec982b;p=lilypond.git page-layout: skip spacing spec for empty lines; issue 1669 --- diff --git a/input/regression/dynamics-empty.ly b/input/regression/dynamics-empty.ly new file mode 100644 index 0000000000..4b06d96fae --- /dev/null +++ b/input/regression/dynamics-empty.ly @@ -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)) + } + } +} diff --git a/lily/page-layout-problem.cc b/lily/page-layout-problem.cc index 11177be03a..c3cd382d41 100644 --- a/lily/page-layout-problem.cc +++ b/lily/page-layout-problem.cc @@ -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);