X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ftie-engraver.cc;h=f44e8b3b0d80a03d55bd7e37fbd29792c921e6db;hb=26633bbfbf821a7cfdfe7a0367d1ea94a440be2e;hp=681c1dfaade242d3ee88c2175b8806d8b0acddca;hpb=fd58a98a46a3def26b80a895f1f7b81c92590fc3;p=lilypond.git diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc index 681c1dfaad..f44e8b3b0d 100644 --- a/lily/tie-engraver.cc +++ b/lily/tie-engraver.cc @@ -90,10 +90,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 = int (Staff_symbol_referencer::get_position (h)); - int left_staff_pos = int (Staff_symbol_referencer::get_position (th)); - - 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!