]> git.donarmstrong.com Git - lilypond.git/commitdiff
lily/note-collision.cc: fix issue #44 (dot/notehead collision)
authorErlend Aasland <erlenda@gmail.com>
Fri, 13 Oct 2006 17:47:19 +0000 (17:47 +0000)
committerErlend Aasland <erlenda@gmail.com>
Fri, 13 Oct 2006 17:47:19 +0000 (17:47 +0000)
ChangeLog
lily/note-collision.cc

index 1058005e5d62d1682209b70e8f2ac9e787374192..b067a8a298e564ef219eb763449479ed0d3de895 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-10-13  Erlend Aasland  <erlenda@gmail.com>
+
+       * lily/note-collision.cc: fix issue #44 (dot/notehead collision)
+
 2006-10-13  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
        * VERSION (PATCH_LEVEL): bump version.
index d9a08dcdc87741f8f7b50b1466e8c4b40c8af208..7bcfa464ceee01b6da9138def0fec95d13d6ba02 100644 (file)
@@ -16,6 +16,7 @@
 #include "output-def.hh"
 #include "pointer-group-interface.hh"
 #include "rhythmic-head.hh"
+#include "staff-symbol-referencer.hh"
 #include "side-position-interface.hh"
 #include "stem.hh"
 #include "warn.hh"
@@ -242,6 +243,28 @@ check_meshing_chords (Grob *me,
   else
     shift_amount *= 0.17;
 
+  /*
+   * Fix issue #44:
+   *
+   * Dots from left note head collide with right note head. Only occurs
+   * with a close half collide, if the left note head is between
+   * lines and the right note head is on a line, and if right note head
+   * hasn't got any dots.
+   */
+  if (close_half_collide
+      && Rhythmic_head::dot_count (nu)
+      && !Rhythmic_head::dot_count (nd))
+    {
+      Grob *staff = Staff_symbol_referencer::get_staff_symbol (me);
+      if (!Staff_symbol_referencer::on_line (staff, ups[0]))
+       {
+         Grob *d = unsmob_grob (nu->get_object ("dot"));
+         Grob *parent = d->get_parent (X_AXIS);
+         if (Dot_column::has_interface (parent))
+           Side_position_interface::add_support (parent, nd);
+       }
+    }
+
   /* For full or close half collisions, the right hand head may
      obscure dots.  Move dots to the right.  */
   if (abs (shift_amount) > 1e-6