From 8706b52ab6c00119a1a7f819e3699257db75a6ef Mon Sep 17 00:00:00 2001 From: Mike Solomon Date: Sat, 6 Apr 2013 09:56:36 +0200 Subject: [PATCH] Make dynamics "inside-staff" grobs in the dynamics context; issue 3241. Even though dynamics contexts have no staffs, we treat them as "in staff" material because they are in the core of the vertical axis group. This classification prevents potential problems of having nothing considered on the inside of these vertical axis groups. --- .../dynamics-outside-staff-priority.ly | 18 ++++++++++++++++++ ly/engraver-init.ly | 3 +++ 2 files changed, 21 insertions(+) create mode 100644 input/regression/dynamics-outside-staff-priority.ly diff --git a/input/regression/dynamics-outside-staff-priority.ly b/input/regression/dynamics-outside-staff-priority.ly new file mode 100644 index 0000000000..399a6fd5c3 --- /dev/null +++ b/input/regression/dynamics-outside-staff-priority.ly @@ -0,0 +1,18 @@ +\version "2.17.15" + +\header { + texidoc = "@code{DynamicText}, @code{DynamicLineSpanner}, and +@code{Hairpin} do not have @code{outside-staff-priority} in @code{Dynamics} +contexts. This allows grobs with @code{outside-staff-priority} set +to be positioned above and below them. +" +} + +<< + \new Staff = "Test" { + \tempo "Andante" c'1 + } + \new Dynamics \with { alignAboveContext = "Test" } { + s1\f + } +>> diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index 58ee39a123..d1f284da94 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -414,6 +414,9 @@ a collection of staves, with a bracket in front and spanning bar lines." (padding . 0.5)) \override TextScript.font-shape = #'italic \override DynamicLineSpanner.Y-offset = #0 + \override DynamicLineSpanner.outside-staff-priority = ##f + \override DynamicText.outside-staff-priority = ##f + \override Hairpin.outside-staff-priority = ##f \override DynamicText.X-offset = #(ly:make-simple-closure `(,+ -- 2.39.2