From: Matthew Rowles Date: Sat, 17 May 2008 11:11:13 +0000 (+1000) Subject: Fix 614. X-Git-Tag: release/2.11.46-1~17 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6ffcbaad983cee66f03041cc9096b27ecbfe7d22;p=lilypond.git Fix 614. Unless an ottava bracket occurs directly after a line break, allow its left edge to have non-zero height. --- diff --git a/input/regression/ottava-edge.ly b/input/regression/ottava-edge.ly new file mode 100644 index 0000000000..314d5f966c --- /dev/null +++ b/input/regression/ottava-edge.ly @@ -0,0 +1,43 @@ + +\header +{ + texidoc = + "Both edge heights of an ottava bracket can be specified." +} +\version "2.11.45" + + +\layout { ragged-right = ##t} + +\relative c''' { + + %standard ottavation + #(set-octavation 1) + a b c + #(set-octavation 0) + a + + %override the left edge height to produce standard text with a left edge + #(set-octavation 1) + \once \override Staff.OttavaBracket #'edge-height = #'(1.2 . 1.2) + a b c + #(set-octavation 0) + a + + % Look! we can make them go up! + #(set-octavation 1) + \once \override Staff.OttavaBracket #'edge-height = #'(-1 . -1) + a b c + #(set-octavation 0) + a + + % and have them go in different directions + #(set-octavation 1) + \once \override Staff.OttavaBracket #'edge-height = #'(-1.2 . 1.2) + a b c + #(set-octavation 0) + a + +} + + diff --git a/lily/ottava-bracket.cc b/lily/ottava-bracket.cc index a2ed6b5422..8221814531 100644 --- a/lily/ottava-bracket.cc +++ b/lily/ottava-bracket.cc @@ -132,10 +132,13 @@ Ottava_bracket::print (SCM smob) Drul_array flare = robust_scm2interval (me->get_property ("bracket-flare"), Interval (0, 0)); - edge_height[LEFT] = 0.0; - edge_height[RIGHT] *= -get_grob_direction (me); - if (broken[RIGHT]) - edge_height[RIGHT] = 0.0; + do + { + edge_height[d] *= -get_grob_direction (me); + if (broken[d]) + edge_height[d] = 0.0; + } + while (flip(&d) != LEFT); Stencil b; Interval empty;