]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/align-interface.cc
Merge branch 'master' of ssh://kainhofer@git.sv.gnu.org/srv/git/lilypond into dev...
[lilypond.git] / lily / align-interface.cc
index 45761f40c8a6cd7a2ffa8ec1dd83bcb1f114f971..4bcab804351fe3c129e9c257a6500630f7849274 100644 (file)
@@ -7,16 +7,17 @@
 */
 
 #include "align-interface.hh"
-#include "spanner.hh"
-#include "item.hh"
 #include "axis-group-interface.hh"
-#include "pointer-group-interface.hh"
-#include "hara-kiri-group-spanner.hh"
 #include "grob-array.hh"
+#include "hara-kiri-group-spanner.hh"
 #include "international.hh"
+#include "item.hh"
+#include "paper-column.hh"
+#include "pointer-group-interface.hh"
+#include "spanner.hh"
+#include "skyline-pair.hh"
 #include "system.hh"
 #include "warn.hh"
-#include "paper-column.hh"
 
 /*
   TODO: for vertical spacing, should also include a rod & spring
@@ -188,9 +189,7 @@ Align_interface::get_extents_aligned_translates (Grob *me,
        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"
-                       "Only do cross-staff spanners with PianoStaff."));
-
+       me->programming_error ("vertical alignment called before line-breaking");
     }
   
   Direction stacking_dir = robust_scm2dir (me->get_property ("stacking-dir"),
@@ -223,6 +222,9 @@ Align_interface::get_extents_aligned_translates (Grob *me,
          dy = down_skyline.distance (skylines[j][-stacking_dir]);
        }
 
+      if (isinf (dy)) /* if the skyline is empty, maybe max_height is infinity_f */
+       dy = 0.0;
+
       dy = max (0.0, dy + padding + extra_space / elems.size ());
       down_skyline.raise (-stacking_dir * dy);
       where += stacking_dir * dy;
@@ -398,18 +400,16 @@ Align_interface::calc_max_stretch (SCM smob)
 }
 
 ADD_INTERFACE (Align_interface,
+              "Order grobs from top to bottom, left to right, right to left"
+              " or bottom to top.  For vertical alignments of staves, the"
+              " @code{break-system-details} of the left"
+              " @rinternals{NonMusicalPaperColumn} may be set to tune"
+              " vertical spacing.  Set @code{alignment-extra-space} to add"
+              " extra space for staves.  Set"
+              " @code{fixed-alignment-extra-space} to force staves in"
+              " @code{PianoStaff}s further apart.",
               
-              "Order grobs from top to bottom, left to right, right to left or bottom "
-              "to top.  "
-              "For vertical alignments of staves, the @code{break-system-details} of "
-              "the left @internalsref{NonMusicalPaperColumn} may be set to tune vertical spacing "
-              "Set @code{alignment-extra-space} to add extra space for staves. Set "
-              "@code{fixed-alignment-extra-space} to force staves in PianoStaves further apart."
-              ,
-              
-              /*
-                properties
-               */
+              /* properties */
               "align-dir "
               "axes "
               "elements "