X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fstem.cc;h=32ccc700b85a6b12e4f88e42503effd2e74fe0e5;hb=03450b2aa4d991de72a9ce57aff429c66f2172cc;hp=8589fc0295f02595fcda8ed9d7e986984609c0aa;hpb=2bc051a8adb54b804406983cedab6196e643dd34;p=lilypond.git diff --git a/lily/stem.cc b/lily/stem.cc index 8589fc0295..32ccc700b8 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -294,24 +294,22 @@ Stem::get_default_stem_end_position (Grob*me) else { s = me->get_grob_property ("lengths"); - for (SCM q = s; q != SCM_EOL; q = ly_cdr (q)) - a.push (gh_scm2double (ly_car (q))); - - // stem uses half-spaces - length_f = a[ ((duration_log (me) - 2) >? 0) get_grob_property ("stem-shorten"); - for (SCM q = s; gh_pair_p (q); q = ly_cdr (q)) - a.push (gh_scm2double (ly_car (q))); - - - // stem uses half-spaces - - // fixme: use scm_list_n_ref () iso. array[] - Real shorten_f = a[ ((duration_log (me) - 2) >? 0) get_grob_property ("stem-shorten"); + if (gh_pair_p (sshorten)) + { + shorten_f = 2* gh_scm2double (robust_list_ref ((duration_log (me) - 2) >? 0, sshorten)); + } /* On boundary: shorten only half */ if (abs (chord_start_y (me)) == 0.5) @@ -760,20 +758,6 @@ Stem::beam_l (Grob*me) return unsmob_grob (b); } -/* - return I-th element, or last elt L - - PRE: length (L) > 0 - */ -SCM -robust_list_ref(int i, SCM l) -{ - while (i-- && gh_pair_p (gh_cdr(l))) - l = gh_cdr (l); - - return gh_car(l); -} - // ugh still very long. Stem_info Stem::calc_stem_info (Grob*me)