static Grob *accidentals (Grob *me);
static Grob *arpeggio (Grob *me);
static Slice head_positions_interval (Grob *me);
- static Direction static_dir (Grob *);
static void translate_rests (Grob *me, int dy);
static Grob *first_head (Grob *me);
static Grob *get_rest (Grob *me);
Interval notedim;
for (vsize i = 0; i < notes.size (); i++)
- notedim.unite (notes[i]->extent (common, Y_AXIS));
-
+ {
+ if (Note_column::dir (notes[i]) == -dir)
+ {
+ /* try not to look at the stem, as looking at a beamed
+ note may trigger beam positioning prematurely.
+
+ This happens with dotted rests, which need Y
+ positioning to compute X-positioning.
+ */
+ Grob *head = Note_column::first_head (notes[i]);
+ if (head)
+ notedim.unite (head->extent (common, Y_AXIS));
+ else
+ programming_error ("Note_column without first_head()");
+ }
+ else
+ notedim.unite (notes[i]->extent (common, Y_AXIS));
+ }
Real y = dir * max (0.0,
-dir * restdim[-dir] + dir * notedim[dir] + minimum_dist);