From 3843957db03bfe5558f5842c8f6471befb14352f Mon Sep 17 00:00:00 2001
From: Han-Wen Nienhuys <hanwen@xs4all.nl>
Date: Tue, 17 Feb 2004 17:30:03 +0000
Subject: [PATCH] 	* lily/accidental-engraver.cc
 (process_acknowledged_grobs): use 	properties from Voice context. This
 fixes staff-switches during 	grace contexts.

---
 ChangeLog                   |  4 ++++
 lily/accidental-engraver.cc | 21 +++++++++++++++------
 ly/engraver-init.ly         |  2 +-
 3 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f124ce859b..51f9decf7b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,10 @@
 
 2004-02-17  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+	* lily/accidental-engraver.cc (process_acknowledged_grobs): use
+	properties from Voice context. This fixes staff-switches during
+	grace contexts.
+
 	* lily/note-collision.cc (check_meshing_chords): only wipe heads
 	if necessary. Else, simply wipe dots.
 
diff --git a/lily/accidental-engraver.cc b/lily/accidental-engraver.cc
index ae3fe262a8..7b24e37cde 100644
--- a/lily/accidental-engraver.cc
+++ b/lily/accidental-engraver.cc
@@ -283,7 +283,13 @@ Accidental_engraver::process_acknowledged_grobs ()
 
 	  if (num)
 	    {
-	      Grob * a = make_item ("Accidental");
+	      /*
+		We construct the accidentals at the originating Voice
+		level, so that we get the property settings for
+		Accidental from the respective Voice.
+	       */
+	      Grob * a = make_item_from_properties (origin,
+						    ly_symbol2scm ("Accidental"));
 	      a->set_parent (support, Y_AXIS);
 
 	      if (!accidental_placement_)
@@ -483,11 +489,14 @@ Accidental_engraver::process_music ()
 
 
 ENTER_DESCRIPTION (Accidental_engraver,
-"Make accidentals.  Catches note heads, ties and notices key-change "
-" events.  Due to interaction with ties (which don't come together "
-" with note heads), this needs to be in a context higher than Tie_engraver.",
-	       "Accidental",
-/* accepts */     "",
+		   "Make accidentals.  Catches note heads, ties and notices key-change "
+		   "events.  This engraver usually lives at Staff level, but "
+		   "reads the settings for Accidental at @code{Voice} level, " 
+		   "so you can @code{\\override} them at @code{Voice}. "
+		   ,
+		   
+		   "Accidental",
+		   "",
 	       "finger-interface rhythmic-head-interface tie-interface arpeggio-interface",
 	       "localKeySignature extraNatural autoAccidentals autoCautionaries",
 		   "localKeySignature");
diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly
index 4581cd6115..74c260355d 100644
--- a/ly/engraver-init.ly
+++ b/ly/engraver-init.ly
@@ -557,7 +557,7 @@ AncientRemoveEmptyStaffContext = \translator {
 	(Voice Beam position-callbacks (,Beam::least_squares
 					,Beam::check_concave
 					,Beam::slope_damping))
-	(Staff Accidental font-size -4)
+	(Voice Accidental font-size -4)
 	(Voice Slur direction -1)
     )
     
-- 
2.39.5