From: Dan Eble Date: Mon, 13 Jul 2015 00:34:00 +0000 (-0400) Subject: Issue 4503 (4/4) Semi_tie cleanup X-Git-Tag: release/2.19.24-1~5^2~7 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=3c0ea5216f264fc98fd15017697454a01ae21299;p=lilypond.git Issue 4503 (4/4) Semi_tie cleanup --- diff --git a/lily/include/semi-tie.hh b/lily/include/semi-tie.hh index d56caf7e32..97a3dcbe04 100644 --- a/lily/include/semi-tie.hh +++ b/lily/include/semi-tie.hh @@ -32,8 +32,6 @@ struct Semi_tie static int get_column_rank (Item *); static int get_position (Item *); static Item *head (Item *); - // return the head if it is present on the given side - static Item *head (Item *, Direction d); }; #endif /* SEMI_TIE_HH */ diff --git a/lily/semi-tie.cc b/lily/semi-tie.cc index 17520daf70..049cd029d6 100644 --- a/lily/semi-tie.cc +++ b/lily/semi-tie.cc @@ -55,21 +55,22 @@ MAKE_SCHEME_CALLBACK (Semi_tie, calc_control_points, 1) SCM Semi_tie::calc_control_points (SCM smob) { - Grob *me = unsmob (smob); + Item *me = LY_ASSERT_SMOB(Item, smob, 1); + (void) me->get_property ("direction"); - if (Semi_tie_column::has_interface (me->get_parent (Y_AXIS))) - { - me->get_parent (Y_AXIS)->get_property ("positioning-done"); - } - else + Grob *yparent = me->get_parent (Y_AXIS); + if (Semi_tie_column::has_interface (yparent)) { - programming_error ("lv tie without Semi_tie_column. Killing lv tie."); - me->suicide (); + /* trigger positioning. */ + yparent->get_property ("positioning-done"); + + return me->get_property_data ("control-points"); } - // TODO: Even if me->suicide() was called? - return me->get_property_data ("control-points"); + programming_error ("lv tie without Semi_tie_column. Killing lv tie."); + me->suicide (); + return SCM_EOL; } int @@ -102,10 +103,3 @@ Semi_tie::head (Item *me) { return unsmob (me->get_object ("note-head")); } - -Item * -Semi_tie::head (Item *me, Direction d) -{ - SCM head_dir = me->get_property ("head-direction"); - return (is_direction (head_dir) && (to_dir (head_dir) == d)) ? head (me) : 0; -}