]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix #286.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 17 Feb 2007 23:11:42 +0000 (00:11 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 17 Feb 2007 23:11:42 +0000 (00:11 +0100)
Use staff_space in Stem_tremolo::get_beam_translation()

input/regression/stem-tremolo-staff-space.ly [new file with mode: 0644]
lily/stem-tremolo.cc

diff --git a/input/regression/stem-tremolo-staff-space.ly b/input/regression/stem-tremolo-staff-space.ly
new file mode 100644 (file)
index 0000000..22063b6
--- /dev/null
@@ -0,0 +1,25 @@
+\header {
+
+  texidoc = "stem tremolo vertical distance also obeys staff-space settings. "
+
+}
+
+\version "2.10.19"
+
+\layout {
+  ragged-right = ##t
+}
+
+fragment = \relative c' {
+  c4:64 c:64 c8:64 c:64 c:64 c:64 c:64
+}
+
+
+<<
+  \new Staff \with {
+    fontSize = #-4
+    \override StaffSymbol #'staff-space = #(magstep -4)
+  }
+  \fragment
+  \new Staff \fragment
+>>
index 9bb588db4f73450917cfe182143ffad014aac300..a718b7f69d132918fe6ee370fe87f503a879cc00 100644 (file)
@@ -84,7 +84,9 @@ Stem_tremolo::get_beam_translation (Grob *me)
   Spanner *beam = Stem::get_beam (stem);
 
   return (beam && beam->is_live ())
-    ? Beam::get_beam_translation (beam) : 0.81;
+    ? Beam::get_beam_translation (beam)
+    : (Staff_symbol_referencer::staff_space (me)
+       * robust_scm2double (me->get_property ("length-fraction"), 1.0) * 0.81);
 }
 
 Stencil