From: Mike Solomon Date: Sat, 1 Oct 2011 18:05:12 +0000 (+0200) Subject: Fixes the reading of the positions property in tuplet-number.cc. X-Git-Tag: release/2.15.14-1~13 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=71da6417b8defa33c6c5a2a6ace29d5666e5c1cf;p=lilypond.git Fixes the reading of the positions property in tuplet-number.cc. Positions can theoretically be "empty" if the left is higher than the right. Thus, to find its center, we don't use the interval center function and instead find the center manually. --- diff --git a/lily/tuplet-number.cc b/lily/tuplet-number.cc index aaa862395d..72c40f37f1 100644 --- a/lily/tuplet-number.cc +++ b/lily/tuplet-number.cc @@ -79,8 +79,7 @@ Tuplet_number::calc_y_offset (SCM smob) Spanner *tuplet = unsmob_spanner (me->get_object ("bracket")); Interval positions = robust_scm2interval (tuplet->get_property ("positions"), Interval (0.0, 0.0)); - - return scm_from_double (positions.center ()); + return scm_from_double ((positions[LEFT] + positions[RIGHT]) / 2.0); } MAKE_SCHEME_CALLBACK (Tuplet_number, calc_cross_staff, 1)