From: Han-Wen Nienhuys Date: Mon, 19 Feb 2007 14:40:16 +0000 (+0100) Subject: Fix #289. X-Git-Tag: release/2.10.20-1~23 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8bbe398ae375a4aa2bd1e2a68514fc9d33e7ffd7;p=lilypond.git Fix #289. Override graceSettings for \voiceOne, \voiceTwo. --- diff --git a/input/regression/grace-direction-polyphony.ly b/input/regression/grace-direction-polyphony.ly new file mode 100644 index 0000000000..924a58e0f9 --- /dev/null +++ b/input/regression/grace-direction-polyphony.ly @@ -0,0 +1,13 @@ +\header { + + texidoc = "The @code{\voiceOne} setting is retained after +finishing the grace section." + +} +\version "2.10.19" + +\relative c''' { + \voiceOne + c4 + \grace d8 c4 +} diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index 27a0437ffa..1a3a8c9686 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -592,6 +592,9 @@ AncientRemoveEmptyStaffContext = \context { %% figuredBassFormatter = #format-bass-figure metronomeMarkFormatter = #format-metronome-markup + + + %% See also make-voice-props-set graceSettings = #`( (Voice Stem direction ,UP) (Voice Stem font-size -3) diff --git a/scm/music-functions.scm b/scm/music-functions.scm index ad55398b0c..fc401c6b17 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -330,6 +330,17 @@ i.e. this is not an override" (if (odd? n) -1 1))) direction-polyphonic-grobs) (list + (make-property-set 'graceSettings + ;; TODO: take this from voicedGraceSettings or similar. + '((Voice Stem font-size -3) + (Voice NoteHead font-size -3) + (Voice Dots font-size -3) + (Voice Stem length-fraction 0.8) + (Voice Stem no-stem-extend #t) + (Voice Beam thickness 0.384) + (Voice Beam length-fraction 0.8) + (Voice Accidental font-size -4))) + (make-grob-property-set 'NoteColumn 'horizontal-shift (quotient n 2)) (make-grob-property-set 'MultiMeasureRest 'staff-position (if (odd? n) -4 4)))))) @@ -338,8 +349,9 @@ i.e. this is not an override" (append (map (lambda (x) (make-grob-property-revert x 'direction)) direction-polyphonic-grobs) - (list (make-grob-property-revert 'NoteColumn 'horizontal-shift)) - (list (make-grob-property-revert 'MultiMeasureRest 'staff-position))))) + (list (make-property-unset 'graceSettings) + (make-grob-property-revert 'NoteColumn 'horizontal-shift) + (make-grob-property-revert 'MultiMeasureRest 'staff-position))))) (define-safe-public (context-spec-music m context #:optional id)