- Grob *d = unsmob_grob (nd->get_property ("dot"));
- Grob *parent = d->get_parent (X_AXIS);
- if (Dot_column::has_interface (parent))
- Side_position_interface::add_support (parent, nu);
+ if (up_ball_type == 0 && down_ball_type == 1)
+ shift_amount *= 1.25;
+ else if (up_ball_type == 0 && down_ball_type == 2)
+ shift_amount *= 1.35;
+ else if (down_ball_type == 0 && up_ball_type == 1)
+ shift_amount *= 0.7;
+ else if (down_ball_type == 0 && up_ball_type == 2)
+ shift_amount *= 0.75;
+ }
+
+ /* If the dotted notes ended up on the left, and there are collisions,
+ tell the Dot_Columnn to avoid the notes on the right.
+ */
+ if (full_collide || close_half_collide || distant_half_collide)
+ {
+ if (shift_amount < -1e-6
+ && Rhythmic_head::dot_count (head_up)
+ && !Rhythmic_head::dot_count (head_down))
+ {
+ Grob *d = unsmob_grob (head_up->get_object ("dot"));
+ Grob *parent = d->get_parent (X_AXIS);
+ if (Dot_column::has_interface (parent))
+ Side_position_interface::add_support (parent, head_down);
+ }
+ else if (Rhythmic_head::dot_count (head_down)
+ && !Rhythmic_head::dot_count (head_up))
+ {
+ Grob *d = unsmob_grob (head_down->get_object ("dot"));
+ Grob *parent = d->get_parent (X_AXIS);
+ if (Dot_column::has_interface (parent))
+ {
+ Grob *stem = unsmob_grob (head_up->get_object ("stem"));
+ extract_grob_set (stem, "note-heads", heads);
+ for (vsize i = 0; i < heads.size (); i++)
+ Side_position_interface::add_support (parent, heads[i]);
+ }
+ }