]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/rest.cc
* scm/music-functions.scm (descend-to-context): new
[lilypond.git] / lily / rest.cc
index 658c2e80af2674d6382627a66a1ab956920e6c2a..16b5032ec1baccb7d375167709f0d3b84e7f93ba 100644 (file)
@@ -24,7 +24,7 @@ Rest::after_line_breaking (SCM smob)
   int bt = gh_scm2int (me->get_property ("duration-log"));
   int lc = Staff_symbol_referencer::line_count (me);
   Real ss = Staff_symbol_referencer::staff_space (me);
-  if(lc % 2)
+  if (lc % 2)
     {
       if (bt == 0 && lc > 1)
        {
@@ -140,7 +140,7 @@ Rest::brew_internal_stencil (SCM smob)
       me->warning (_f ("rest `%s' not found, ", font_char.to_str0 ()));
     }
 
-  return out.smobbed_copy();
+  return out.smobbed_copy ();
 }
 
 SCM 
@@ -165,9 +165,12 @@ SCM
 Rest::polyphonic_offset_callback (SCM smob, SCM)
 {
   Grob* me = unsmob_grob (smob);
+  if (gh_number_p (me->get_property ("staff-position")))
+    return gh_double2scm (0);
+
   Direction d = get_grob_direction (me);
   Real off = 2* d ;
-  if(off)
+  if (off)
     off *= Staff_symbol_referencer::staff_space (me);
   return gh_double2scm (off);
 }