]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/align-interface.cc
Tomas Sauer's fix for alternatives in abc2ly.
[lilypond.git] / lily / align-interface.cc
index 89d2648ae21400a4f889895ce7786e5d0b2b9ea8..7b3e8037230c96e9e92844f4c43d3bb3d61f6d0a 100644 (file)
@@ -16,6 +16,7 @@
 #include "international.hh"
 #include "system.hh"
 #include "warn.hh"
+#include "paper-column.hh"
 
 /*
   TODO: for vertical spacing, should also include a rod & spring
@@ -146,8 +147,17 @@ get_skylines (Grob *me,
   vector<Grob*> child_refpoints;
   for (vsize i = 0; i < elements->size (); i++)
     {
-      extract_grob_set ((*elements)[i], "elements", child_elts);
-      Grob *child_common = common_refpoint_of_array (child_elts, (*elements)[i], other_axis (a));
+      Grob *elt = (*elements)[i];
+      Grob *child_common = unsmob_grob ((a == Y_AXIS)
+                                       ? elt->get_object ("X-common")
+                                       : elt->get_object ("Y-common"));
+      
+      if (!child_common)
+       {
+         extract_grob_set (elt, "elements", child_elts);
+         child_common = common_refpoint_of_array (child_elts, elt, other_axis (a));
+       }
+      
       child_refpoints.push_back (child_common);
     }
   Grob *common_refpoint = common_refpoint_of_array (child_refpoints, me, other_axis (a));