]> git.donarmstrong.com Git - lilypond.git/commitdiff
Honor Rest #'direction; issue 1410
authorKeith OHara <k-ohara5a5a@oco.net>
Tue, 20 Dec 2011 03:10:50 +0000 (19:10 -0800)
committerKeith OHara <k-ohara5a5a@oco.net>
Sat, 24 Dec 2011 22:20:16 +0000 (14:20 -0800)
input/regression/rest-polyphonic.ly
lily/rest-collision.cc

index 2a210d0d8514531182db2b4cd15924e207698add..5360bcb0787a279c9363a4d16113c0ec2974428c 100644 (file)
@@ -1,8 +1,8 @@
 \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. "
 
 }
 
@@ -13,8 +13,8 @@ even if there is no opposite note or rest. The amount is two
 
 
 \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   } >>
 }
 
 
index fc8a4b401d2880347f687c2b908d62f0d5140f3b..3a78163774cd28e5c84ecfde149b18102fe0e21e 100644 (file)
@@ -207,11 +207,12 @@ Rest_collision::calc_positioning_done (SCM smob)
       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")))