From: Han-Wen Nienhuys Date: Sun, 17 Dec 2006 18:34:02 +0000 (+0100) Subject: take the left most head as bound for the TieColumn. Fixes #166. X-Git-Tag: release/2.11.3-1~16 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5eb3858abc958263032f2395e6d4c483e4bb51af;p=lilypond.git take the left most head as bound for the TieColumn. Fixes #166. --- diff --git a/lily/tie-column.cc b/lily/tie-column.cc index 85529ef1d5..dd54530e81 100644 --- a/lily/tie-column.cc +++ b/lily/tie-column.cc @@ -25,18 +25,22 @@ using namespace std; void -Tie_column::add_tie (Grob *me, Grob *tie) +Tie_column::add_tie (Grob *tc, Grob *tie) { + Spanner *me = dynamic_cast (tc); + if (tie->get_parent (Y_AXIS) && Tie_column::has_interface (tie->get_parent (Y_AXIS))) return; - if (!Pointer_group_interface::count (me, ly_symbol2scm ("ties"))) + if (!me->get_bound (LEFT) + || (Paper_column::get_rank (me->get_bound (LEFT)->get_column ()) + > Paper_column::get_rank (dynamic_cast (tie)->get_bound (LEFT)->get_column ()))) { - dynamic_cast (me)->set_bound (LEFT, Tie::head (tie, LEFT)); - dynamic_cast (me)->set_bound (RIGHT, Tie::head (tie, RIGHT)); + me->set_bound (LEFT, Tie::head (tie, LEFT)); + me->set_bound (RIGHT, Tie::head (tie, RIGHT)); } - + tie->set_parent (me, Y_AXIS); Pointer_group_interface::add_grob (me, ly_symbol2scm ("ties"), tie); }