- 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 *system = unsmob_grob (get_property ("rootSystem"));
+ if (system)
+ Axis_group_interface::add_element (system, text_spanner_);
+ else
+ text_spanner_->programming_error ("cannot find root system");