- Direction d = get_grob_direction (me);
- if (d)
- {
- for (int i = ties.size (); i--;)
- {
- Grob * t = ties[i];
- set_grob_direction (t, d);
- }
- return;
- }
-
- if (ties.size () == 1)
- {
- Grob * t = ties[0];
- set_grob_direction (t, Tie::get_default_dir (t));
- return;
- }
-
- ties.sort (tie_compare);
- set_grob_direction (ties[0], DOWN);
- ties.del (0);
-
- set_grob_direction (ties.pop (), UP);
- for (int i = ties.size (); i--;)
- {
- Grob * t = ties[i];
- Real p = Tie::get_position (t);
- Direction d = (Direction) sign (p);
- if (!d)
- d = UP;
- 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'.
-
- */