X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Falign-interface.cc;h=daffa298fb1226d7c029034a81fa61aab3b2ebea;hb=1610f049bbf71254072aa490f3824a00bb0ad42c;hp=45761f40c8a6cd7a2ffa8ec1dd83bcb1f114f971;hpb=b089f84f7978bbbb0e90dbb6c4a6988ad678da38;p=lilypond.git diff --git a/lily/align-interface.cc b/lily/align-interface.cc index 45761f40c8..daffa298fb 100644 --- a/lily/align-interface.cc +++ b/lily/align-interface.cc @@ -188,9 +188,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 +221,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 +399,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" + " @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" + " @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 "