]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/accidental-engraver.cc
(output_def_body): take ownership of identifier
[lilypond.git] / lily / accidental-engraver.cc
index 1c626529cae3df8b3444309a31e4f1509c421566..39a66ba95374e842d4d6cadb5839cf172b2a4ad6 100644 (file)
@@ -77,13 +77,13 @@ public:
     to store all information before we can really create the
     accidentals.
   */
-  std::vector<Grob*> left_objects_;
-  std::vector<Grob*> right_objects_;
+  vector<Grob*> left_objects_;
+  vector<Grob*> right_objects_;
 
   Grob *accidental_placement_;
 
-  std::vector<Accidental_entry> accidentals_;
-  std::vector<Spanner*> ties_;
+  vector<Accidental_entry> accidentals_;
+  vector<Spanner*> ties_;
 };
 
 /*
@@ -347,7 +347,8 @@ Accidental_engraver::process_acknowledged ()
 
          /* Cannot look for ties: it's not guaranteed that they reach
             us before the notes. */
-         if (num)
+         if (num
+             && !note->is_mus_type ("trill-span-event"))
            create_accidental (&accidentals_[i], num > 1, cautionary);
        }
     }
@@ -391,6 +392,7 @@ Accidental_engraver::make_standard_accidental (Music *note,
                                               Engraver *trans)
 {
 
+  (void)note;
   /*
     We construct the accidentals at the originating Voice
     level, so that we get the property settings for
@@ -407,7 +409,14 @@ Accidental_engraver::make_standard_accidental (Music *note,
     so it is put left of the accidentals.
   */
   for (vsize i = 0; i < left_objects_.size (); i++)
-    Side_position_interface::add_support (left_objects_[i], a);
+    {
+      if (left_objects_[i]->get_property ("side-axis") == scm_from_int (X_AXIS))
+       Side_position_interface::add_support (left_objects_[i], a);
+    }
+
+  /*
+    Hmm. Junkme? 
+   */
   for (vsize i = 0; i < right_objects_.size (); i++)
     Side_position_interface::add_support (a, right_objects_[i]);
 
@@ -428,7 +437,7 @@ Accidental_engraver::make_suggested_accidental (Music *note,
                                                Grob *note_head,
                                                Engraver *trans)
 {
-
+  (void) note;
   Grob *a
     = make_grob_from_properties (trans,
                                 ly_symbol2scm ("AccidentalSuggestion"),
@@ -530,10 +539,11 @@ Accidental_engraver::acknowledge_rhythmic_head (Grob_info info)
 {
   Music *note = info.music_cause ();
   if (note
-      && note->is_mus_type ("note-event"))
+      && (note->is_mus_type ("note-event")
+         || note->is_mus_type ("trill-span-event")))
     {
       /*
-       std::string harmonics usually don't have accidentals.
+       string harmonics usually don't have accidentals.
       */
       if (to_boolean (get_property ("harmonicAccidentals"))
          || !ly_is_equal (info.grob ()->get_property ("style"),
@@ -584,6 +594,7 @@ ADD_ACKNOWLEDGER (Accidental_engraver, rhythmic_head);
 ADD_ACKNOWLEDGER (Accidental_engraver, tie);
 
 ADD_TRANSLATOR (Accidental_engraver,
+               
                "Make accidentals.  "
                "Catch note heads, ties and notices key-change events.  "
                "This engraver usually lives at Staff level, but "