From: Han-Wen Nienhuys Date: Mon, 25 Feb 2008 00:44:47 +0000 (-0300) Subject: Fix #557. X-Git-Tag: release/2.11.41-1~4 X-Git-Url: https://git.donarmstrong.com/lilypond.git?a=commitdiff_plain;h=4b8dc8caac9bae6dc9856be8e38ef7b5b42854cb;p=lilypond.git Fix #557. Fix ancient thinko with staccato dots on forced stem directions. Document this case analysis. --- diff --git a/input/regression/staccato-pos.ly b/input/regression/staccato-pos.ly index 68da7e545c..7f0d3210ee 100644 --- a/input/regression/staccato-pos.ly +++ b/input/regression/staccato-pos.ly @@ -14,16 +14,26 @@ ragged-right = ##t } -\context Voice { - \relative c' { - e'4-. f-. g-. d-. c-. b-. - \stemDown - e,-. d-. c-. b-. a-. g-. +{ + \new Voice \relative c'' { + \voiceOne + g8-. a-. b-. c-. + a-. b-. c-. d-. + b8[-. a-. g b] + e,-. f-. g-. a-. + e-. g-. b-. d-. + } + \context Voice { + \relative c' { + e'4-. f-. g-. d-. c-. b-. + \stemDown + e,-. d-. c-. b-. a-. g-. + } + \relative c'' { + \stemUp + d-> c-> b-> a-> g-> f-> e-> d-> + d' + d-. c-. b-. a-. g-. f-. e-. d-. + } } - \relative c'' { - \stemUp - d-> c-> b-> a-> g-> f-> e-> d-> - d' - d-. c-. b-. a-. g-. f-. e-. d-. - } } diff --git a/lily/side-position-interface.cc b/lily/side-position-interface.cc index 19d9a88dc8..a3c4ca08a7 100644 --- a/lily/side-position-interface.cc +++ b/lily/side-position-interface.cc @@ -247,9 +247,11 @@ Side_position_interface::aligned_side (Grob *me, Axis a, bool pure, int start, i Real rounded = directed_round (position, dir); Grob *head = me->get_parent (X_AXIS); - if (fabs (position) <= 2 * Staff_symbol_referencer::staff_radius (me) + 1 + if (fabs (position) <= 2 * Staff_symbol_referencer::staff_radius (me) + 1 + /* In case of a ledger lines, quantize even if we're outside the staff. */ || (Note_head::has_interface (head) - && sign (Staff_symbol_referencer::get_position (head)) == - dir)) + + && abs (Staff_symbol_referencer::get_position (head)) > position)) { o += (rounded - position) * 0.5 * ss; if (Staff_symbol_referencer::on_line (me, int (rounded)))