- if (Align_interface::has_interface (i.elem_l_)
- && Align_interface::axis (i.elem_l_) == Y_AXIS
- //System_start_delimiter::has_interface (i.elem_l_)
- && i.origin_trans_l_->daddy_trans_l_ == daddy_trans_l_)
+ if (dynamic_cast<Spanner*> (i.grob_)
+ && i.grob_->internal_has_interface (ly_symbol2scm ("dynamic-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::axis_b (i.grob_, Y_AXIS)))
+ && !Align_interface::has_interface (i.grob_))