From 8ef5f99e63cc9e52c7c0071cde4d99e057d10329 Mon Sep 17 00:00:00 2001 From: David Nalesnik Date: Wed, 15 Mar 2017 07:17:56 -0500 Subject: [PATCH 1/1] Issue 5097: reach HorizontalBracketText through directed tweak HorizontalBracketText is now caused by HorizontalBracket, rather than the same note-grouping event. Fix a number of programming errors caused by commit for Issue 5064. --- Documentation/changes.tely | 2 +- .../snippets/new/analysis-brackets-with-labels.ly | 8 ++++---- input/regression/horizontal-bracket-broken-texted.ly | 7 ++++--- input/regression/horizontal-bracket-texted.ly | 4 ++-- lily/horizontal-bracket-engraver.cc | 2 +- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Documentation/changes.tely b/Documentation/changes.tely index f205d0014c..b9782edbb8 100644 --- a/Documentation/changes.tely +++ b/Documentation/changes.tely @@ -75,7 +75,7 @@ It is now possible to add text to analysis brackets through the { \once \override HorizontalBracketText.text = "a" c''\startGroup d''\stopGroup - e''-\tweak text "a'" \startGroup d''\stopGroup + e''-\tweak HorizontalBracketText.text "a'" \startGroup d''\stopGroup } @end lilypond diff --git a/Documentation/snippets/new/analysis-brackets-with-labels.ly b/Documentation/snippets/new/analysis-brackets-with-labels.ly index 30ae349b05..93f65ea49d 100644 --- a/Documentation/snippets/new/analysis-brackets-with-labels.ly +++ b/Documentation/snippets/new/analysis-brackets-with-labels.ly @@ -27,12 +27,12 @@ Bracket text will be parenthesized after a line break. \once\override HorizontalBracketText.text = "a'" e''\startGroup d''\stopGroup c'' - -\tweak text \markup \bold \huge "b" \startGroup - -\tweak text "a" \startGroup + -\tweak HorizontalBracketText.text \markup \bold \huge "b" \startGroup + -\tweak HorizontalBracketText.text "a" \startGroup d''\stopGroup - e''-\tweak text "a'" \startGroup + e''-\tweak HorizontalBracketText.text "a'" \startGroup d''\stopGroup\stopGroup - c''-\tweak text foo \startGroup d'' e'' f'' + c''-\tweak HorizontalBracketText.text foo \startGroup d'' e'' f'' \break g'' a'' b'' c'''\stopGroup } diff --git a/input/regression/horizontal-bracket-broken-texted.ly b/input/regression/horizontal-bracket-broken-texted.ly index 1f8455261e..00bcac987f 100644 --- a/input/regression/horizontal-bracket-broken-texted.ly +++ b/input/regression/horizontal-bracket-broken-texted.ly @@ -15,11 +15,12 @@ breaks. { c'' - -\tweak text \markup \draw-circle #1 #0.5 ##f \startGroup - -\tweak text "a" \startGroup + -\tweak HorizontalBracketText.text \markup \draw-circle #1 #0.5 ##f + \startGroup + -\tweak HorizontalBracketText.text "a" \startGroup d'' e'' f'' g'' a'' b'' c'''\stopGroup - c'''-\tweak text "a'" \startGroup b'' a'' g'' + c'''-\tweak HorizontalBracketText.text "a'" \startGroup b'' a'' g'' \break f'' e'' d'' c''\stopGroup\stopGroup } diff --git a/input/regression/horizontal-bracket-texted.ly b/input/regression/horizontal-bracket-texted.ly index dc1a673a08..0ab4520236 100644 --- a/input/regression/horizontal-bracket-texted.ly +++ b/input/regression/horizontal-bracket-texted.ly @@ -21,8 +21,8 @@ usual nesting order of brackets. \time 3/4 \key f \major c4 - -\tweak text "contrasting period" \startGroup - -\tweak text "a" \startGroup + -\tweak HorizontalBracketText.text "contrasting period" \startGroup + -\tweak HorizontalBracketText.text "a" \startGroup a8( bes c f) f4( e d) c d8( c bes c) diff --git a/lily/horizontal-bracket-engraver.cc b/lily/horizontal-bracket-engraver.cc index 1f176a3215..860495750a 100644 --- a/lily/horizontal-bracket-engraver.cc +++ b/lily/horizontal-bracket-engraver.cc @@ -94,7 +94,7 @@ Horizontal_bracket_engraver::process_music () { Spanner *sp = make_spanner ("HorizontalBracket", events_[k]->self_scm ()); - Spanner *hbt = make_spanner ("HorizontalBracketText", events_[k]->self_scm ()); + Spanner *hbt = make_spanner ("HorizontalBracketText", sp->self_scm ()); sp->set_object ("bracket-text", hbt->self_scm ()); -- 2.39.2