X-Git-Url: https://git.donarmstrong.com/lilypond.git?a=blobdiff_plain;f=lily%2Ftie-engraver.cc;h=2d557498fe75537b1dce357d75a7cb3e6f368dc3;hb=8125630b2c344b10ac7a0a4f485575ad720dd807;hp=7cc71e4d5150a427017fd5bf84e7ac7a9095801d;hpb=4cd439ba6e20ba385de6842c4a0c44145a0ff013;p=lilypond.git diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc index 7cc71e4d51..2d557498fe 100644 --- a/lily/tie-engraver.cc +++ b/lily/tie-engraver.cc @@ -89,9 +89,15 @@ Tie_engraver::acknowledge_grob (Grob_info i) for (int i = heads_to_tie_.size (); i--;) { Grob *th = heads_to_tie_[i]; - int staff_pos = gh_scm2int (h->get_grob_property ("staff-position")); - int left_staff_pos = gh_scm2int (th->get_grob_property ("staff-position")); - if (staff_pos == left_staff_pos) + Music * right_mus = unsmob_music (h->get_grob_property ("cause")); + Music * left_mus = unsmob_music (th->get_grob_property ("cause")); + + /* + maybe should check positions too. + */ + if (right_mus && left_mus + && gh_equal_p (right_mus->get_mus_property ("pitch"), + left_mus->get_mus_property ("pitch"))) { Grob * p = new Spanner (get_property ("Tie")); Tie::set_interface (p); // cannot remove yet!