\header {
- texidoc = "In polyphonic situations, rests are moved down
-even if there is no opposite note or rest. The amount is two
-@code{staff-space}s. "
+ texidoc = "In polyphonic situations, rests are moved according
+to their @code{direction} even if there is no opposite note or rest.
+The amount is two @code{staff-space}s. "
}
\new Staff \relative c' {
- << { r8 g''4 g8 r g4 g8 } \\
- { d,4 r d r } >>
+ << { r8 g''4 g8 r g4 g8 } \\
+ { d,4 r \stemUp b r } >>
}
for (vsize i = 0; i < rests.size (); i++)
{
Grob *rcol = rests[i];
- Direction dir = Note_column::dir (rcol);
+ Grob *rest = Note_column::get_rest (rcol);
+
+ Direction dir = get_grob_direction (rest);
if (!dir)
- continue;
+ dir = Note_column::dir (rcol);
- Grob *rest = Note_column::get_rest (rcol);
// Do not compute a translation for pre-positioned rests,
// nor count them for the "too many colliding rests" warning
if (scm_is_number (rest->get_property ("staff-position")))