- Side_position_interface::add_support (me,rh);
-
- Pointer_group_interface ::add_element (me, "dots",d);
- d->add_offset_callback (Dot_column::force_shift_callback_proc , Y_AXIS);
+ Side_position_interface::add_support (me, head);
+
+ Pointer_group_interface::add_grob (me, ly_symbol2scm ("dots"), d);
+ d->set_property ("Y-offset", Grob::x_parent_positioning_proc);
+ // Dot formatting requests the Y-offset, which for rests may
+ // trigger post-linebreak callbacks. On the other hand, we need the
+ // correct X-offset of the dots for horizontal collision avoidance.
+ // The translation here is undone in calc_positioning_done, where we
+ // do the X-offset properly.
+ if (Rest::has_interface (head))
+ d->translate_axis (head->extent (head, X_AXIS).length (), X_AXIS);
+ else
+ d->set_property ("X-offset", Grob::x_parent_positioning_proc);