From 492a7326057fec726684ef429763c745e9ec982b Mon Sep 17 00:00:00 2001 From: Keith OHara Date: Sun, 5 May 2013 23:49:24 -0700 Subject: [PATCH 1/1] page-layout: skip spacing spec for empty lines; issue 1669 --- input/regression/dynamics-empty.ly | 26 ++++++++++++++++++++++++++ lily/page-layout-problem.cc | 3 +++ 2 files changed, 29 insertions(+) create mode 100644 input/regression/dynamics-empty.ly 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); -- 2.39.2