From: Han-Wen Nienhuys Date: Mon, 22 Mar 2004 22:57:40 +0000 (+0000) Subject: * input/regression/property-grace-polyphony.ly: new file. X-Git-Tag: release/2.1.34~9 X-Git-Url: https://git.donarmstrong.com/lilypond.git?a=commitdiff_plain;h=457ba3ebdcdb302d2cbf3001617d0aae59446d9c;p=lilypond.git * input/regression/property-grace-polyphony.ly: new file. * lily/translator-property.cc (execute_pushpop_property): only pop one instance of the property. This fixes << \\ >> together with \grace. --- diff --git a/ChangeLog b/ChangeLog index eccd595f38..77833b1211 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2004-03-22 Han-Wen Nienhuys + * input/regression/property-grace-polyphony.ly: new file. + + * lily/translator-property.cc (execute_pushpop_property): only pop + one instance of the property. This fixes << \\ >> together with + \grace. + * lily/break-align-interface.cc (ordered_elements): we cannot modify the #'elements property, so return reordered array. diff --git a/input/regression/property-grace-polyphony.ly b/input/regression/property-grace-polyphony.ly new file mode 100644 index 0000000000..3e0f87756a --- /dev/null +++ b/input/regression/property-grace-polyphony.ly @@ -0,0 +1,17 @@ + +\header { + + texidoc = "Property overrides and reverts from @code{\\grace} do + not interfere with the overrides and reverts from polyphony." + +} + +\version "2.1.32" +\score { + \notes \relative c'' { + << + { \grace e8 d2 } + \\ { a2 } >> + } +} + diff --git a/lily/translator-property.cc b/lily/translator-property.cc index 4d7a8016d3..de977343fc 100644 --- a/lily/translator-property.cc +++ b/lily/translator-property.cc @@ -88,18 +88,25 @@ execute_pushpop_property (Context * trg, while (prev_alist != daddy) { - if (!gh_equal_p (gh_caar (prev_alist), eltprop)) + if (gh_equal_p (gh_caar (prev_alist), eltprop)) { - *tail = gh_cons (gh_car (prev_alist), daddy); - tail = SCM_CDRLOC (*tail); + prev_alist = gh_cdr (prev_alist); + break ; } + + + *tail = gh_cons (gh_car (prev_alist), SCM_EOL); + tail = SCM_CDRLOC (*tail); prev_alist = gh_cdr (prev_alist); } - if (new_alist == SCM_EOL) + if (new_alist == SCM_EOL && prev_alist == daddy) trg->unset_property (prop); else - trg->internal_set_property (prop, gh_cons (new_alist, daddy)); + { + *tail = prev_alist; + trg->internal_set_property (prop, gh_cons (new_alist, daddy)); + } } } else diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index 3dec9753f1..8283cfe962 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -531,7 +531,6 @@ AncientRemoveEmptyStaffContext = \context { metronomeMarkFormatter = #format-metronome-markup graceSettings = #`#( (Voice Stem direction 1) - ;; TODO: should take from existing definition. ;; c&p from define-grobs.scm diff --git a/scm/music-functions.scm b/scm/music-functions.scm index d9ce891e75..be08cbef42 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -182,7 +182,8 @@ i.e. this is not an override" 'grob-property gprop)) (define direction-polyphonic-grobs - '(Tie Rest Slur Script TextScript Stem Dots DotColumn)) + '(Stem Tie Rest Slur Script TextScript Dots DotColumn + )) (define-public (make-voice-props-set n) (make-sequential-music @@ -190,9 +191,12 @@ i.e. this is not an override" (map (lambda (x) (make-grob-property-set x 'direction (if (odd? n) -1 1))) direction-polyphonic-grobs) - (list (make-grob-property-set 'NoteColumn 'horizontal-shift (quotient n 2)) - (make-grob-property-set 'MultiMeasureRest 'staff-position - (if (odd? n) -4 4)))))) + (list + (make-grob-property-set 'NoteColumn 'horizontal-shift (quotient n 2)) + (make-grob-property-set 'MultiMeasureRest 'staff-position (if (odd? n) -4 4)) + + )))) + (define-public (make-voice-props-revert) (make-sequential-music