X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fnote-collision.cc;h=3da3de58c95234d1ab52efb57a5d286b631558e2;hb=6b93aa32e32d736202d803c68f5156cc253a5f7c;hp=82e3dc091c06782a503aa503b2fdf6fcf42daac4;hpb=b1323f33e9aa4b9eea05eefb8755c907d4d762d4;p=lilypond.git diff --git a/lily/note-collision.cc b/lily/note-collision.cc index 82e3dc091c..3da3de58c9 100644 --- a/lily/note-collision.cc +++ b/lily/note-collision.cc @@ -6,6 +6,8 @@ (c) 1997--2004 Han-Wen Nienhuys */ +#include + #include "warn.hh" #include "note-collision.hh" #include "note-column.hh" @@ -69,6 +71,13 @@ check_meshing_chords (Grob *me, // FIXME: what's this? bool merge_possible = (ups[0] >= dps[0]) && (ups.top () >= dps.top ()); + + + /* Do not merge notes typeset in different style. */ + if ( !gh_equal_p (nu->get_property ("style"), + nd->get_property ("style") ) ) + merge_possible = false; + int upball_type = Note_head::get_balltype (nu); int dnball_type = Note_head::get_balltype (nd); @@ -237,7 +246,7 @@ check_meshing_chords (Grob *me, /* TODO: these numbers are magic; should devise a set of grob props to tune this behavior. */ else if (stem_to_stem) - shift_amount *= -0.65; + shift_amount = -abs (shift_amount) * 0.65; else if (close_half_collide && !touch) shift_amount *= 0.52; else if (distant_half_collide && !touch) @@ -284,10 +293,10 @@ Note_collision_interface::do_shifts (Grob* me) Real wid = 0.0; do { - if(cg[d].size()) + if (cg[d].size ()) { Grob *h = cg[d][0]; - wid = Note_column::first_head (h)->extent (h,X_AXIS).length() ; + wid = Note_column::first_head (h)->extent (h,X_AXIS).length () ; } } while (flip (&d) != UP);