From: Han-Wen Nienhuys Date: Fri, 19 May 2006 13:40:19 +0000 (+0000) Subject: (set_stem_lengths): trigger 'beaming callback, in X-Git-Tag: release/2.9.6~23 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=0cd8c7e901b532437cef10e5b7ded91a82c9faa8;p=lilypond.git (set_stem_lengths): trigger 'beaming callback, in case positions is set manually. Backportme. --- diff --git a/ChangeLog b/ChangeLog index 0f6d236466..e5dacee8db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-05-19 Han-Wen Nienhuys + + * lily/beam.cc (set_stem_lengths): trigger 'beaming callback, in + case positions is set manually. Backportme. + 2006-05-18 Erik Sandberg * scm/ly-syntax-constructors.scm: New file. Converted a few syntax diff --git a/lily/beam.cc b/lily/beam.cc index f6c07a84cb..8089cb8270 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -1090,13 +1090,13 @@ where_are_the_whole_beams (SCM beaming) /* Return the Y position of the stem-end, given the Y-left, Y-right in POS for stem S. This Y position is relative to S. */ Real -Beam::calc_stem_y (Grob *me, Grob *s, Grob ** common, +Beam::calc_stem_y (Grob *me, Grob *stem, Grob **common, Real xl, Real xr, Drul_array pos, bool french) { Real beam_translation = get_beam_translation (me); - Real r = s->relative_coordinate (common[X_AXIS], X_AXIS) - xl; + Real r = stem->relative_coordinate (common[X_AXIS], X_AXIS) - xl; Real dy = pos[RIGHT] - pos[LEFT]; Real dx = xr - xl; Real stem_y_beam0 = (dy && dx @@ -1104,8 +1104,8 @@ Beam::calc_stem_y (Grob *me, Grob *s, Grob ** common, * dy : 0) + pos[LEFT]; - Direction my_dir = get_grob_direction (s); - SCM beaming = s->get_property ("beaming"); + Direction my_dir = get_grob_direction (stem); + SCM beaming = stem->get_property ("beaming"); Real stem_y = stem_y_beam0; if (french) @@ -1116,13 +1116,13 @@ Beam::calc_stem_y (Grob *me, Grob *s, Grob ** common, } else { - Slice bm = Stem::beam_multiplicity (s); + Slice bm = Stem::beam_multiplicity (stem); if (!bm.is_empty ()) stem_y += bm[my_dir] * beam_translation; } Real id = me->relative_coordinate (common[Y_AXIS], Y_AXIS) - - s->relative_coordinate (common[Y_AXIS], Y_AXIS); + - stem->relative_coordinate (common[Y_AXIS], Y_AXIS); return stem_y + id; } @@ -1137,8 +1137,9 @@ Beam::set_stem_lengths (SCM smob) { Grob *me = unsmob_grob (smob); - /* trigger callback. */ + /* trigger callbacks. */ (void) me->get_property ("direction"); + (void) me->get_property ("beaming"); SCM posns = me->get_property ("positions");