From: Han-Wen Nienhuys <hanwen@xs4all.nl> Date: Sat, 17 Feb 2007 23:11:42 +0000 (+0100) Subject: Fix #286. X-Git-Tag: release/2.10.19-1~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f4c86971811e351e7e4544da0a314b5fb67066e1;p=lilypond.git Fix #286. Use staff_space in Stem_tremolo::get_beam_translation() --- diff --git a/input/regression/stem-tremolo-staff-space.ly b/input/regression/stem-tremolo-staff-space.ly new file mode 100644 index 0000000000..22063b6141 --- /dev/null +++ b/input/regression/stem-tremolo-staff-space.ly @@ -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 +>> diff --git a/lily/stem-tremolo.cc b/lily/stem-tremolo.cc index 5ada4e5b32..4d842aff3d 100644 --- a/lily/stem-tremolo.cc +++ b/lily/stem-tremolo.cc @@ -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