X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fbreak-align-item.cc;h=4318f0b78d534e5e058987f08e5cf276494c7043;hb=643c1a49be582b0f0959db5904c284e8f1dd2a16;hp=36f536ba0fd4d2313b312feff9d9c26ae6e2abbf;hpb=c3e7d94cc2bac8567c25797865968bd53ce2bd38;p=lilypond.git diff --git a/lily/break-align-item.cc b/lily/break-align-item.cc index 36f536ba0f..4318f0b78d 100644 --- a/lily/break-align-item.cc +++ b/lily/break-align-item.cc @@ -64,6 +64,11 @@ Break_align_interface::self_align_callback (SCM element_smob, SCM axis) me->set_grob_property ("self-alignment-X", gh_int2scm (RIGHT)); } + /* + Force break alignment itself to be done first, in the case + */ + + return Side_position::aligned_on_self (element_smob, axis); } @@ -169,7 +174,7 @@ Break_align_interface::do_alignment (Grob *me) /* Force callbacks for alignment to be called */ - Align_interface::align_to_extents (me, X_AXIS); + Align_interface::align_elements_to_extents (me, X_AXIS); Real pre_space = elems[0]->relative_coordinate (column, X_AXIS); @@ -199,10 +204,33 @@ Break_align_interface::do_alignment (Grob *me) stretch_distance = spring_len; } + /* Hint the spacing engine how much space to put in. The pairs are in the format of an interval (ie. CAR < CDR). + */ + /* + UGH UGH UGH + + This is a side effect, and there is no guarantee that this info is + computed at a "sane" moment. + + (just spent some time tracking a bug that was caused by this info + being written halfway: + + self_alignment_callback (*) + -> child->relative_coordinate (self) + -> break_alignment + -> child->relative_coordinate (column) + + the last call incorporates the value that should've been computed + in (*), but--of course-- is not yet. + + The result is that an offsets of align_elements_to_extents () are + not compensated for, and spring_len is completely off. + + */ column->set_grob_property ("extra-space", scm_cons (gh_double2scm (pre_space),