X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fnote-collision.cc;h=e84e5263c63a57160ce55f577232db2e40a40e83;hb=5e08569186d16ee6f01ea4495fe3a1510eb3cee7;hp=a3f18ab0026be756ee22c60280ea201afd0bd428;hpb=31568c504806f35aac420a394c9eab07abd9faa7;p=lilypond.git diff --git a/lily/note-collision.cc b/lily/note-collision.cc index a3f18ab002..e84e5263c6 100644 --- a/lily/note-collision.cc +++ b/lily/note-collision.cc @@ -48,7 +48,8 @@ check_meshing_chords (Grob *me, if (ups[0] > dps.back () + 1) return; - // FIXME: what's this? + /* Merge heads if the notes lie the same line, or if the "stem-up-note" is + above the "stem-down-note". */ bool merge_possible = (ups[0] >= dps[0]) && (ups.back () >= dps.back ()); /* Do not merge notes typeset in different style. */ @@ -304,7 +305,9 @@ Note_collision_interface::calc_positioning_done (SCM smob) if (cg[d].size ()) { Grob *h = cg[d][0]; - wid = Note_column::first_head (h)->extent (h, X_AXIS).length (); + Grob *fh = Note_column::first_head (h); + if (fh) + wid = fh->extent (h, X_AXIS).length (); } } while (flip (&d) != UP); @@ -354,7 +357,14 @@ Note_collision_interface::get_clash_groups (Grob *me) { Grob *se = elements[i]; if (Note_column::has_interface (se)) - clash_groups[Note_column::dir (se)].push_back (se); + { + if (!Note_column::dir (se)) + { + se->programming_error ("note-column has no direction"); + } + else + clash_groups[Note_column::dir (se)].push_back (se); + } } Direction d = UP;