]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/rest-collision.cc
* Documentation/user/music-glossary.itely: add Finnish author.
[lilypond.git] / lily / rest-collision.cc
index 6a7eceecaba2586874b35c919319f024559528db..e80e0d9cd751c57a7d59aa00d8b7a24191b8d436 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include <math.h>              // ceil.
@@ -113,8 +113,14 @@ Rest_collision::do_shift (Grob *me)
 
   // no partners to collide with
   if (rests.size () + notes.size () < 2)
-    return SCM_UNSPECIFIED;
-
+    {
+      if (rests.size () == 1
+         && Note_column::dir (rests[0]))
+       {
+         Note_column::translate_rests (rests[0],
+                                       4 * Note_column::dir (rests[0]));
+       }
+    }
   // meisjes met meisjes
   if (!notes.size ()) 
     {
@@ -203,7 +209,7 @@ Rest_collision::do_shift (Grob *me)
 
       Real staff_space = Staff_symbol_referencer::staff_space (rcol);
 
-      Real minimum_dist = gh_scm2double (me->get_grob_property ("minimum-distance")) * staff_space;
+      Real minimum_dist = robust_scm2double (me->get_grob_property ("minimum-distance"), 1.0) * staff_space;
 
 
       Grob *common = common_refpoint_of_array (notes, rcol, Y_AXIS);