From f390a74b5109a9ceb2af0e0447d931a9f9f38892 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sat, 13 Oct 2012 18:01:51 +0200 Subject: [PATCH] Fix unproper nesting of various property overrides Due to the unavailability of \temporary\override, \acciaccatura and \slashedGrace had been losing any previous setting of Flag.stroke-style. \crossStaff had been losing the previous setting of Flag.style. \harmonicByFret and \harmonicDots had been losing the previous setting of TabNoteHead.stencil, NoteHead.Y-extent and NoteHead.stencil. \temporary\override is employed in this patch for fixing those shortcomings. --- ly/grace-init.ly | 4 ++-- ly/music-functions-init.ly | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ly/grace-init.ly b/ly/grace-init.ly index abbfd8a3d9..2e3dbce1cb 100644 --- a/ly/grace-init.ly +++ b/ly/grace-init.ly @@ -21,7 +21,7 @@ stopAppoggiaturaMusic = { startAcciaccaturaMusic = { <>\startGraceSlur - \override Flag #'stroke-style = #"grace" + \temporary \override Flag #'stroke-style = #"grace" } stopAcciaccaturaMusic = { @@ -30,7 +30,7 @@ stopAcciaccaturaMusic = { } startSlashedGraceMusic = { - \override Flag #'stroke-style = #"grace" + \temporary \override Flag #'stroke-style = #"grace" } stopSlashedGraceMusic = { diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index 4ffb06f10a..71bd76ca54 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -259,8 +259,8 @@ crossStaff = #(define-music-function (parser location notes) (ly:music?) (_i "Create cross-staff stems") #{ - \override Stem #'cross-staff = #cross-staff-connect - \override Flag #'style = #'no-flag + \temporary \override Stem #'cross-staff = #cross-staff-connect + \temporary \override Flag #'style = #'no-flag $notes \revert Stem #'cross-staff \revert Flag #'style @@ -418,11 +418,11 @@ harmonicByFret = #(define-music-function (parser location fret music) (number? l harmonics played on a fretted instrument by touching the strings at @var{fret}.") #{ \set harmonicDots = ##t - \override TabNoteHead #'stencil = #(tab-note-head::print-custom-fret-label (number->string fret)) - \override NoteHead #'Y-extent = #(ly:make-unpure-pure-container ly:grob::stencil-height + \temporary \override TabNoteHead #'stencil = #(tab-note-head::print-custom-fret-label (number->string fret)) + \temporary \override NoteHead #'Y-extent = #(ly:make-unpure-pure-container ly:grob::stencil-height (lambda (grob start end) (ly:grob::stencil-height grob))) - \override NoteHead #'stencil = #(lambda (grob) (ly:grob-set-property! grob 'style 'harmonic-mixed) + \temporary \override NoteHead #'stencil = #(lambda (grob) (ly:grob-set-property! grob 'style 'harmonic-mixed) (ly:note-head::print grob)) $(make-harmonic (calc-harmonic-pitch (fret->pitch (number->string fret)) music)) @@ -438,11 +438,11 @@ harmonics played on a fretted instrument by touching the strings at the point given through @var{ratio}.") #{ \set harmonicDots = ##t - \override TabNoteHead #'stencil = #(tab-note-head::print-custom-fret-label (ratio->fret ratio)) - \override NoteHead #'Y-extent = #(ly:make-unpure-pure-container ly:grob::stencil-height + \temporary \override TabNoteHead #'stencil = #(tab-note-head::print-custom-fret-label (ratio->fret ratio)) + \temporary \override NoteHead #'Y-extent = #(ly:make-unpure-pure-container ly:grob::stencil-height (lambda (grob start end) (ly:grob::stencil-height grob))) - \override NoteHead #'stencil = #(lambda (grob) (ly:grob-set-property! grob 'style 'harmonic-mixed) + \temporary \override NoteHead #'stencil = #(lambda (grob) (ly:grob-set-property! grob 'style 'harmonic-mixed) (ly:note-head::print grob)) $(make-harmonic (calc-harmonic-pitch (ratio->pitch ratio) music)) -- 2.39.5