]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/rest.cc
*** empty log message ***
[lilypond.git] / lily / rest.cc
index aee966e1b1e8911aea54a691fa6bf4c6cd82316f..7375e107f5f4e195ba9301f0d3102a44929c5776 100644 (file)
@@ -21,7 +21,7 @@ Rest::after_line_breaking (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
   int bt = gh_scm2int (me->get_grob_property ("duration-log"));
-  if (bt == 0)
+  if (bt == 0 && Staff_symbol_referencer::line_count (me) > 1)
     {
       me->translate_axis (Staff_symbol_referencer::staff_space (me) , Y_AXIS);
     }
@@ -48,7 +48,7 @@ Rest::glyph_name (Grob * me, int balltype, String style)
   if (balltype == 0 || balltype == 1)
     {
       Real rad = Staff_symbol_referencer::staff_radius (me) * 2.0;
-      Real pos = Staff_symbol_referencer::position_f (me);
+      Real pos = Staff_symbol_referencer::get_position (me);
 
       /*
        Figure out when the rest is far enough outside the staff. This
@@ -61,7 +61,7 @@ Rest::glyph_name (Grob * me, int balltype, String style)
                              (pos  <= -rad -2 || pos > rad));
     }
 
-  return ("rests-") + to_str (balltype)
+  return ("rests-") + to_string (balltype)
     + (ledger_b ? "o" : "") + style;
 }
 
@@ -115,14 +115,9 @@ Rest::extent_callback (SCM smob, SCM ax)
   return ly_interval2scm (unsmob_molecule (m)->extent (a));
 }
 
-bool
-Rest::has_interface (Grob*m)
-{
-  return m && m->has_interface (ly_symbol2scm ("rest-interface"));
-}
 
 
 ADD_INTERFACE (Rest,"rest-interface",
   "a rest",
-  "style");
+  "style minimum-beam-collision-distance");