From 50afec85de2d21cf978bf1bc0e5171603c645116 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 23 Jun 2002 23:00:30 +0000 Subject: [PATCH] '' --- ChangeLog | 8 ++++++-- lily/piano-pedal-engraver.cc | 8 +++++--- lily/text-spanner.cc | 4 ++-- scm/grob-property-description.scm | 1 + 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5d9564be2e..6d8fcde883 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,10 +7,14 @@ lists of grobs. This should fix the problems of lily in combination with pthreads/qthreads. -2002-06-23 Han-Wen - * lily/grob.cc (mark_smob): bugfix: mark X parent too. +2002-06-23 Chris Jackson + + * lily/text-spanner.cc (setup_pedal_bracket): + * lily/piano-pedal-engraver.cc (create_bracket_grobs): + Fix the lengths of mixed-style piano pedal brackets. + 2002-06-23 Jan Nieuwenhuizen * Documentation/user/tutorial.itely (First steps): Add missing diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index 982c33b2d1..14bfb4e319 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -352,10 +352,12 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, SCM pedaltype) gh_bool2scm (false)); /* - Warning: we can't hang the bracket on an item in Y-direction: - it will cause problems when the bracket is broken, because the - item can be on another line. + Mixed style: Store a pointer to the preceding text for use in + calculating the length of the line */ + if (p->item_p_) + p->bracket_p_->set_grob_property ("pedal-text", p->item_p_->self_scm ()); + p->bracket_p_->set_bound (LEFT, unsmob_grob (get_property ("currentMusicalColumn"))); Axis_group_interface::add_element (p->line_spanner_, p->bracket_p_); diff --git a/lily/text-spanner.cc b/lily/text-spanner.cc index f4ab3b5247..a6cb05fe93 100644 --- a/lily/text-spanner.cc +++ b/lily/text-spanner.cc @@ -244,7 +244,7 @@ Text_spanner::setup_pedal_bracket(Spanner *me) if ( to_boolean (me->get_grob_property ("text-start")) ) { height[LEFT] = 0; - Grob * textbit = me->get_parent(Y_AXIS); + Grob * textbit = unsmob_grob (me->get_grob_property("pedal-text")); extra_short = padding; if (textbit->internal_has_interface(ly_symbol2scm("text-interface"))) // for plain text, e.g., Sost. Ped. @@ -287,7 +287,7 @@ struct Pianopedal }; ADD_INTERFACE (Pianopedal,"piano-pedal-interface", "", - "pedal-type edge-widen edge-height shorten-pair text-start left-widen right-widen"); + "pedal-type edge-widen edge-height shorten-pair text-start left-widen right-widen pedal-text"); ADD_INTERFACE (Text_spanner,"text-spanner-interface", "generic text spanner", diff --git a/scm/grob-property-description.scm b/scm/grob-property-description.scm index fc64c21f28..cedaf07851 100644 --- a/scm/grob-property-description.scm +++ b/scm/grob-property-description.scm @@ -267,6 +267,7 @@ FIXME: also pair? (cons LEFT RIGHT) (grob-property-description 'old-accidentals list? "list of (pitch, accidental) pairs.") (grob-property-description 'padding number? "add this much extra space between objects that are next to each other.") (grob-property-description 'pedal-type symbol? "Style of piano pedal: text, bracket or mixed.") +(grob-property-description 'pedal-text ly-grob? "Pointer to the text of a mixed-style piano pedal.") (grob-property-description 'penalty number? "Penalty for breaking at this column. 10000 or more means forbid linebreak, -10000 or less means force linebreak. Other values influence linebreaking decisions -- 2.39.2