X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fstem.cc;h=947a429c23f472770474dd10c9fb8abb8a4053e6;hb=b872748c6aa8bb721ced458691b38ac2fac5dfc8;hp=a8105c9402adfe132fe1a3ebc6c636a8c273c321;hpb=1de3d397c18622b6061402fef18e625701712bc5;p=lilypond.git diff --git a/lily/stem.cc b/lily/stem.cc index a8105c9402..947a429c23 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -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 "