X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fstaff-spacing.cc;h=801fb96948e66fdc78c66750519d3f986928781f;hb=3d73a166dcc6738ce5fa1c29d9ded1bd995406a3;hp=8a8822a803ad16cd51237eab3f6b754ef553e2f8;hpb=62f3c5d4ddb492bc771f2d25b971cd3c9f38676d;p=lilypond.git diff --git a/lily/staff-spacing.cc b/lily/staff-spacing.cc index 8a8822a803..801fb96948 100644 --- a/lily/staff-spacing.cc +++ b/lily/staff-spacing.cc @@ -108,7 +108,7 @@ Staff_spacing::next_notes_correction (Grob *me, } /* We calculate three things here: the ideal distance, the minimum distance - (which is the distance at which collisions will occure) and the "fixed" + (which is the distance at which collisions will occur) and the "fixed" distance, which is the distance at which things start to look really bad. We arrange things so that the fixed distance will be attained when the line is compressed with a force of 1.0 */ @@ -119,8 +119,10 @@ Staff_spacing::get_spacing (Grob *me, Grob *right_col) Grob *left_col = me_item->get_column (); Interval last_ext; - Grob *last_grob = Separation_item::extremal_break_aligned_grob (left_col, RIGHT, - &last_ext); + Direction break_dir = me_item->break_status_dir (); + Grob *last_grob = Spacing_interface::extremal_break_aligned_grob (me, LEFT, + break_dir, + &last_ext); if (!last_grob) { /* @@ -194,14 +196,14 @@ Staff_spacing::get_spacing (Grob *me, Grob *right_col) ideal += correction; Spring ret (ideal, min_dist); - ret.set_inverse_stretch_strength (ideal - fixed); + ret.set_inverse_stretch_strength (max (0.0, ideal - fixed)); return ret; } ADD_INTERFACE (Staff_spacing, - "This object calculates spacing details from a " - " breakable symbol (left) to another object. For example, it takes care " - " of optical spacing from a bar lines to a note.", + "This object calculates spacing details from a breakable" + " symbol (left) to another object. For example, it takes care" + " of optical spacing from a bar line to a note.", /* properties */ "stem-spacing-correction "