From 71da6417b8defa33c6c5a2a6ace29d5666e5c1cf Mon Sep 17 00:00:00 2001 From: Mike Solomon Date: Sat, 1 Oct 2011 20:05:12 +0200 Subject: [PATCH] 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. --- lily/tuplet-number.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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) -- 2.39.5