]> git.donarmstrong.com Git - lilypond.git/commitdiff
Make dynamics "inside-staff" grobs in the dynamics context; issue 3241.
authorMike Solomon <mike@apollinemike.com>
Sat, 6 Apr 2013 07:56:36 +0000 (09:56 +0200)
committerMike Solomon <mike@apollinemike.com>
Sat, 6 Apr 2013 07:56:36 +0000 (09:56 +0200)
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.

input/regression/dynamics-outside-staff-priority.ly [new file with mode: 0644]
ly/engraver-init.ly

diff --git a/input/regression/dynamics-outside-staff-priority.ly b/input/regression/dynamics-outside-staff-priority.ly
new file mode 100644 (file)
index 0000000..399a6fd
--- /dev/null
@@ -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
+  }
+>>
index 58ee39a12304b4acf61aa4bbad4c76b683235829..d1f284da94e0ce221f18c8c9a2f26ac8580a7353 100644 (file)
@@ -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
     `(,+