]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tie-column.cc
Merge branch 'master' of git://git.sv.gnu.org/lilypond
[lilypond.git] / lily / tie-column.cc
index 13d5fb0177c1fba2577b293ee0e75c2cb8a3c7b3..dd54530e812edd8e5afcc581573ea0f8a393d0be 100644 (file)
 using namespace std;
 
 void
-Tie_column::add_tie (Grob *me, Grob *tie)
+Tie_column::add_tie (Grob *tc, Grob *tie)
 {
+  Spanner *me = dynamic_cast<Spanner *> (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<Spanner*> (tie)->get_bound (LEFT)->get_column ())))
     {
-      dynamic_cast<Spanner *> (me)->set_bound (LEFT, Tie::head (tie, LEFT));
-      dynamic_cast<Spanner *> (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);
 }
@@ -126,7 +130,7 @@ Tie_column::calc_positioning_done (SCM smob)
 
 
 
-ADD_INTERFACE (Tie_column, "tie-column-interface",
+ADD_INTERFACE (Tie_column,
               "Object that sets directions of multiple ties in a tied chord",
 
               /* properties */