]> 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 0bf83bf354fbdd73863368367937440f54547c29..7b3e8037230c96e9e92844f4c43d3bb3d61f6d0a 100644 (file)
@@ -14,7 +14,9 @@
 #include "hara-kiri-group-spanner.hh"
 #include "grob-array.hh"
 #include "international.hh"
+#include "system.hh"
 #include "warn.hh"
+#include "paper-column.hh"
 
 /*
   TODO: for vertical spacing, should also include a rod & spring
@@ -145,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));
@@ -216,7 +227,10 @@ Align_interface::get_extents_aligned_translates (Grob *me,
   SCM line_break_details = SCM_EOL;
   if (a == Y_AXIS && me_spanner)
     {
-      line_break_details = me_spanner->get_bound (LEFT)->get_property ("line-break-system-details");
+      if (pure)
+       line_break_details = get_root_system (me)->column (start)->get_property ("line-break-system-details");
+      else
+       line_break_details = me_spanner->get_bound (LEFT)->get_property ("line-break-system-details");
 
       if (!me->get_system () && !pure)
        me->warning (_ ("vertical alignment called before line-breaking.\n"
@@ -326,7 +340,7 @@ Align_interface::get_pure_child_y_translation (Grob *me, Grob *ch, int start, in
        return 0;
     }
 
-  programming_error (_ ("tried to get a translation for something that isn't my child"));
+  programming_error (_ ("tried to get a translation for something that is no child of mine"));
   return 0;
 }