+ set_grob_direction (t, d);
+ }
+
+}
+
+/*
+
+% . The algorithm to choose the direction of the ties doesn't work
+% properly. I suggest the following for applying ties sequentially
+% from top to bottom:
+%
+% + The topmost tie is always `up'.
+%
+% + If there is a vertical gap to the last note above larger than
+% or equal to a fifth (or sixth?), the tie is `up', otherwise it
+% is `down'.
+%
+% + The bottommost tie is always `down'.
+
+ */
+void
+Tie_column::werner_directions (Grob *me)
+{
+ Link_array<Grob> ties =
+ Pointer_group_interface__extract_grobs (me, (Grob*)0, "ties");
+
+ if (!ties.size ())
+ return ;
+
+ ties.sort (tie_compare);
+
+ Direction d = get_grob_direction (me);
+ if (d)
+ {
+ for (int i = ties.size (); i--;)
+ {
+ Grob * t = ties[i];
+ if (!get_grob_direction (t))
+ set_grob_direction (t, d);
+ }
+ return ;
+ }
+
+ if (ties.size () == 1)
+ {
+ Grob * t = ties[0];
+ if (t->is_live ()
+ && !get_grob_direction (t))
+ set_grob_direction (t,Tie::get_default_dir (t));
+ return ;