From: Boris Shingarov Date: Sat, 15 May 2010 21:28:32 +0000 (+0100) Subject: Fix #1056: Incorrect height estimation for stems X-Git-Tag: release/2.13.22-1~28 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b86b58161aa6a9ecee5ebca1ad4e7ca66e0027f8;p=lilypond.git Fix #1056: Incorrect height estimation for stems Check for user-overridden 'length when calculating pure height. --- diff --git a/lily/stem.cc b/lily/stem.cc index 314f74e2b4..6bbeb16288 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -255,7 +255,13 @@ Stem::pure_height (SCM smob, if (!to_boolean (me->get_property ("cross-staff"))) { - Real len = scm_to_double (calc_length (smob)) * ss / 2; + Real len_in_halfspaces; + SCM user_set_len_scm = me->get_property_data ("length"); + if (scm_is_number (user_set_len_scm)) + len_in_halfspaces = scm_to_double (user_set_len_scm); + else + len_in_halfspaces = scm_to_double (calc_length (smob)); + Real len = len_in_halfspaces * ss / 2; Direction dir = get_grob_direction (me); Interval hp = head_positions (me);