-
- if (dynamic_cast<Spanner*> (i.elem_l_)
- && ((Axis_group_interface::has_interface (i.elem_l_)
- && Axis_group_interface::axis_b (i.elem_l_, Y_AXIS))
- || (Align_interface::has_interface (i.elem_l_)
- && Align_interface::axis (i.elem_l_) == Y_AXIS)))
+
+ /*
+ 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_))