From: Han-Wen Nienhuys Date: Fri, 4 Aug 2006 12:35:15 +0000 (+0000) Subject: (make_trill): do set_parent also X-Git-Tag: cvs/HEAD~184 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6d0ba72792e43cb3d5986137b4065e9b1e64dc7e;p=lilypond.git (make_trill): do set_parent also if no accidental. --- diff --git a/ChangeLog b/ChangeLog index 9077c550de..7b3d20beac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-08-04 Han-Wen Nienhuys + * lily/pitched-trill-engraver.cc (make_trill): do set_parent also + if no accidental. + * lily/accidental-engraver.cc (process_acknowledged): don't create accidental for trill span event. This fixes spurious accidentals on trills. diff --git a/lily/pitched-trill-engraver.cc b/lily/pitched-trill-engraver.cc index 84e391e231..b514dfd101 100644 --- a/lily/pitched-trill-engraver.cc +++ b/lily/pitched-trill-engraver.cc @@ -82,8 +82,7 @@ Pitched_trill_engraver::make_trill (Music *mus) SCM handle = scm_assoc (key, keysig); bool print_acc - = (handle == SCM_BOOL_F) - || p->get_alteration () == 0; + = (handle == SCM_BOOL_F) || p->get_alteration () == 0; if (trill_head_) { @@ -101,6 +100,7 @@ Pitched_trill_engraver::make_trill (Music *mus) + c0)); trill_group_ = make_item ("TrillPitchGroup", mus->self_scm ()); + trill_group_->set_parent (trill_head_, Y_AXIS); Axis_group_interface::add_element (trill_group_, trill_head_); @@ -112,9 +112,8 @@ Pitched_trill_engraver::make_trill (Music *mus) trill_accidental_->set_property ("accidentals", scm_list_1 (scm_from_int (p->get_alteration ()))); Side_position_interface::add_support (trill_accidental_, trill_head_); trill_head_->set_object ("accidental-grob", trill_accidental_->self_scm ()); - trill_group_->set_parent (trill_head_, Y_AXIS); - Axis_group_interface::add_element (trill_group_, trill_accidental_); trill_accidental_->set_parent (trill_head_, Y_AXIS); + Axis_group_interface::add_element (trill_group_, trill_accidental_); } } diff --git a/scm/output-lib.scm b/scm/output-lib.scm index dbc41d287d..66ffcb0314 100644 --- a/scm/output-lib.scm +++ b/scm/output-lib.scm @@ -289,8 +289,7 @@ centered, X==1 is at the right, X == -1 is at the left." (define (parenthesize-elements grob . rest) (let* - ( - (refp (if (null? rest) + ((refp (if (null? rest) grob (car rest))) (elts (ly:grob-object grob 'elements)) @@ -300,7 +299,7 @@ centered, X==1 is at the right, X == -1 is at the left." (lp (ly:font-get-glyph font "accidentals.leftparen")) (rp (ly:font-get-glyph font "accidentals.rightparen")) (padding (ly:grob-property grob 'padding 0.1))) - + (ly:stencil-add (ly:stencil-translate-axis lp (- (car x-ext) padding) X) (ly:stencil-translate-axis rp (+ (cdr x-ext) padding) X))