From 2b547a5a7d782c3e6cb421b22e53eb481c65b35d Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 7 Sep 2005 23:28:34 +0000 Subject: [PATCH] (get_configuration): also avoid dots for non-space situations. --- ChangeLog | 5 +++++ lily/tie.cc | 39 ++++++++++++++++++++------------------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5500f1c87e..2694dc1c19 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-09-08 Han-Wen Nienhuys + + * lily/tie.cc (get_configuration): also avoid dots for non-space + situations. + 2005-09-07 Jan Nieuwenhuizen * Documentation/user/instrument-notation.itely: Bugfix. diff --git a/lily/tie.cc b/lily/tie.cc index 8a105688be..6e62f424f0 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -261,29 +261,30 @@ Tie::get_configuration (Grob *me_grob, Grob *common, Avoid dot */ Grob *left_dot = unsmob_grob (me->get_bound (LEFT)->get_object ("dot")); - if (left_dot && in_space) + int dot_pos = int (Staff_symbol_referencer::get_position (left_dot)); + if (left_dot + && (staff_position == dot_pos + || staff_position + dir == dot_pos)) { - if (staff_position == Staff_symbol_referencer::get_position (left_dot)) - { - staff_position += dir; - in_space = false; + staff_position += dir; + in_space = !in_space; - if (skylines) - { - Real y = staff_space * 0.5 * staff_position; - attachments = get_skyline_attachment (*skylines, y); - attachments.widen (-gap); - Bezier b = slur_shape (attachments.length(), - details.height_limit_, - details.ratio_); - Offset middle = b.curve_point (0.5); - Offset edge = b.curve_point (0.0); - dy = fabs (middle[Y_AXIS] - edge[Y_AXIS]); - fits_in_space = - (dy < 0.6 * staff_space); - } + if (skylines) + { + Real y = staff_space * 0.5 * staff_position; + attachments = get_skyline_attachment (*skylines, y); + attachments.widen (-gap); + Bezier b = slur_shape (attachments.length(), + details.height_limit_, + details.ratio_); + Offset middle = b.curve_point (0.5); + Offset edge = b.curve_point (0.0); + dy = fabs (middle[Y_AXIS] - edge[Y_AXIS]); + fits_in_space = + (dy < 0.6 * staff_space); } } + /* Avoid flag. */ -- 2.39.5