- create_text ();
- }
-
- /*
- Ugh - typechecking for pedal and dynamic sucks.
- */
- if (dynamic_cast<Spanner*> (i.grob_)
- && (i.grob_->internal_has_interface (ly_symbol2scm ("dynamic-interface"))
- || i.grob_->internal_has_interface (ly_symbol2scm ("piano-pedal-interface")))
- )
- return;
-
- /*
- Hang the instrument names on the staves, but not on the alignment
- groups enclosing that staff. The alignment has no real location,
- but is only a vehicle for the placement routine it contains, and
- therefore the location of its refpoint won't be very useful.
-
- We could also just use stavesFound, but lets keep this working
- without staffs as well.
- */
- if (dynamic_cast<Spanner*> (i.grob_)
- && ((Axis_group_interface::has_interface (i.grob_)
- && Axis_group_interface::has_axis (i.grob_, Y_AXIS)))
- && !Align_interface::has_interface (i.grob_))
- {
- SCM nl = scm_cons (i.grob_->self_scm (),
- get_property ("instrumentSupport"));
-
- context ()->set_property ("instrumentSupport", nl);
+ Grob *staff = info.grob();
+ Pointer_group_interface::add_grob (text_spanner_, ly_symbol2scm ("elements"), staff);
+ Side_position_interface::add_support (text_spanner_, staff);