]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/stem.cc
Doc-es: various updates.
[lilypond.git] / lily / stem.cc
index a8105c9402adfe132fe1a3ebc6c636a8c273c321..947a429c23f472770474dd10c9fb8abb8a4053e6 100644 (file)
@@ -61,9 +61,6 @@ using namespace std;
 #include "stem-tremolo.hh"
 #include "warn.hh"
 
-using std::string;
-using std::vector;
-
 void
 Stem::set_beaming (Grob *me, int beam_count, Direction d)
 {
@@ -94,7 +91,7 @@ Stem::get_beaming (Grob *me, Direction d)
 
   SCM lst = index_get_cell (pair, d);
 
-  int len = scm_ilength (lst);
+  int len = scm_ilength (lst); // -1 for dotted lists!
   return max (len, 0);
 }
 
@@ -555,6 +552,7 @@ Stem::calc_positioning_done (SCM smob)
     }
   bool parity = true;
   Real lastpos = Real (Staff_symbol_referencer::get_position (heads[0]));
+  int threshold = robust_scm2int (me->get_property ("note-collision-threshold"), 1);
   for (vsize i = 1; i < heads.size (); i++)
     {
       Real p = Staff_symbol_referencer::get_position (heads[i]);
@@ -564,7 +562,7 @@ Stem::calc_positioning_done (SCM smob)
         dy should always be 0.5, 0.0, 1.0, but provide safety margin
         for rounding errors.
       */
-      if (dy < 1.1)
+      if (dy < 0.1 + threshold)
         {
           if (parity)
             {
@@ -1187,6 +1185,7 @@ ADD_INTERFACE (Stem,
                "neutral-direction "
                "no-stem-extend "
                "note-heads "
+               "note-collision-threshold "
                "positioning-done "
                "rests "
                "stem-begin-position "