]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/rest.cc
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / lily / rest.cc
index 8d6cba506858f01f4fcccaf23af98d5dc4d4fcf7..b274aab8725d90ab16f73616fdf7e0228e949dfd 100644 (file)
@@ -29,6 +29,8 @@ Rest::y_offset_callback (SCM smob)
 
   Real amount = robust_scm2double (me->get_property ("staff-position"), 0)
     * 0.5 * ss;
+  bool position_override = amount;
+  
   if (line_count % 2)
     {
       if (duration_log == 0 && line_count > 1)
@@ -46,10 +48,11 @@ Rest::y_offset_callback (SCM smob)
   if (dot && duration_log >= -1 && duration_log <= 1) // UGH again.
     {
       dot->set_property ("staff-position",
-                      scm_from_int ((duration_log == 0) ? -1 : 1));
+                        scm_from_int ((duration_log == 0) ? -1 : 1));
     }
 
-  amount += 2 * ss * get_grob_direction (me);; 
+  if (!position_override)
+    amount += 2 * ss * get_grob_direction (me);; 
   
   return scm_from_double (amount);
 }