summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Rowles <rowlesmr@gmail.com>2008-05-17 21:11:13 +1000
committerJoe Neeman <joeneeman@gmail.com>2008-05-17 21:11:13 +1000
commit6ffcbaad983cee66f03041cc9096b27ecbfe7d22 (patch)
tree7ba3a2f7d0f26a5888483dc1567771eb8fe272c3
parent67d33a99a916d9351d56a2382b0c82ebdd4381a5 (diff)
Fix 614.
Unless an ottava bracket occurs directly after a line break, allow its left edge to have non-zero height.
-rw-r--r--input/regression/ottava-edge.ly43
-rw-r--r--lily/ottava-bracket.cc11
2 files changed, 50 insertions, 4 deletions
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<Real> 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;