From 8fa126bb578c54bc2ccf28b1871750e74f9056dc Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 25 May 2003 23:44:16 +0000 Subject: [PATCH] (brew_molecule): clean up function. This fixes bugs with broken 8va spanners. --- lily/text-spanner.cc | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/lily/text-spanner.cc b/lily/text-spanner.cc index 787fa8b1fa..16d7e8f115 100644 --- a/lily/text-spanner.cc +++ b/lily/text-spanner.cc @@ -96,6 +96,10 @@ Text_spanner::brew_molecule (SCM smob) continue; SCM text = index_get_cell (edge_text, d); + + /* + TODO: use markup. + */ edge[d] = Text_item::text2molecule (me, text, properties); if (!edge[d].empty_b ()) edge[d].align_to (Y_AXIS, CENTER); @@ -134,14 +138,13 @@ Text_spanner::brew_molecule (SCM smob) if (broken[d]) continue; - Real dx = (gh_pair_p (ew) ? - gh_scm2double (index_get_cell (ew, d)) * d : - 0); + Real dx = 0.0; + if (gh_pair_p (ew)) + dx = gh_scm2double (index_get_cell (ew, d)) * d; + Real dy = gh_scm2double (index_get_cell (s, d)) * - dir; if (dy) - { - edge_line[d] = Line_spanner::line_molecule (me, thick, dx, dy); - } + edge_line[d] = Line_spanner::line_molecule (me, thick, dx, dy); } while (flip (&d) != LEFT); } @@ -178,6 +181,11 @@ Text_spanner::brew_molecule (SCM smob) of consecutive pedals touching exactly to form an __/\__ Chris Jackson */ +/* + TODO: this should be moved somewhere else (?). + + Perhaps make separate function for pedal-bracket. + */ void Text_spanner::setup_pedal_bracket(Spanner *me) -- 2.39.5