]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/instrument-name-engraver.cc
release: 1.3.142
[lilypond.git] / lily / instrument-name-engraver.cc
index 261cb2e0545d23b9a1db6b2c23786093f1bd0aae..e58439dc9b66fb1b207ff01364083b7503a19a49 100644 (file)
@@ -95,12 +95,18 @@ Instrument_name_engraver::acknowledge_grob (Grob_info i)
   if (dynamic_cast<Spanner*> (i.elem_l_)
       && i.elem_l_->has_interface (ly_symbol2scm ("dynamic-interface")))
     return;
-  
+
+  /*
+    Hang the instrument names on the staffs, 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.
+    
+  */
   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)))
+          && Axis_group_interface::axis_b (i.elem_l_, Y_AXIS)))
+      && !Align_interface::has_interface (i.elem_l_))
     {
       SCM nl = gh_cons (i.elem_l_->self_scm (),
                        get_property ("instrumentSupport"));