to store all information before we can really create the
accidentals.
*/
- Link_array<Grob> left_objects_;
- Link_array<Grob> right_objects_;
+ vector<Grob*> left_objects_;
+ vector<Grob*> right_objects_;
Grob *accidental_placement_;
- std::vector<Accidental_entry> accidentals_;
- Link_array<Spanner> ties_;
+ vector<Accidental_entry> accidentals_;
+ vector<Spanner*> ties_;
};
/*
Grob *
Accidental_engraver::make_standard_accidental (Music *note,
- Grob *support,
+ Grob *note_head,
Engraver *trans)
{
+ (void)note;
/*
We construct the accidentals at the originating Voice
level, so that we get the property settings for
Grob *a
= make_grob_from_properties (trans,
ly_symbol2scm ("Accidental"),
- note->self_scm (),
+ note_head->self_scm (),
"Accidental");
/*
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]);
- a->set_parent (support, Y_AXIS);
+ a->set_parent (note_head, Y_AXIS);
if (!accidental_placement_)
accidental_placement_ = make_item ("AccidentalPlacement",
a->self_scm ());
Accidental_placement::add_accidental (accidental_placement_, a);
- support->set_object ("accidental-grob", a->self_scm ());
+ note_head->set_object ("accidental-grob", a->self_scm ());
return a;
}
Grob *
Accidental_engraver::make_suggested_accidental (Music *note,
- Grob *note_head, Engraver *trans)
+ Grob *note_head,
+ Engraver *trans)
{
-
+ (void) note;
Grob *a
= make_grob_from_properties (trans,
ly_symbol2scm ("AccidentalSuggestion"),
- note->self_scm (),
+ note_head->self_scm (),
"AccidentalSuggestion");
Side_position_interface::add_support (a, note_head);
g->set_object ("tie", ties_[j]->self_scm ());
accidentals_[i].tied_ = true;
}
- ties_.del (j);
+ ties_.erase (ties_.begin () + j);
break;
}
}
{
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"),
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 "