]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/note-collision.cc
* input/regression/rehearsal-mark-number.ly: new file.
[lilypond.git] / lily / note-collision.cc
index 911d8332d3d69378cbf2525034fe99f31baa03e2..50958af832b8d4360f6f30c884f2f4bf110e97ce 100644 (file)
@@ -4,7 +4,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "warn.hh"
@@ -28,9 +28,9 @@ Note_collision_interface::force_shift_callback (SCM element_smob, SCM axis)
   
    me = me->get_parent (a);
 
-   if (! to_boolean (me->get_grob_property ("collision-done")))
+   if (! to_boolean (me->get_grob_property ("positioning-done")))
     {
-      me->set_grob_property ("collision-done", SCM_BOOL_T);
+      me->set_grob_property ("positioning-done", SCM_BOOL_T);
       do_shifts (me);
     }
   
@@ -203,10 +203,19 @@ check_meshing_chords (Grob*me,
       else if (upball_type > dnball_type)
        wipe_ball = nu;
 
-      if (wipe_ball)
+      if (wipe_ball && wipe_ball->live ())
        {
          wipe_ball->set_grob_property ("transparent", SCM_BOOL_T);
-         wipe_ball->set_grob_property ("molecule", SCM_EOL);     
+         wipe_ball->set_grob_property ("molecule", SCM_EOL);
+
+         if (Grob *d = unsmob_grob (wipe_ball->get_grob_property ("dot")))
+           d->suicide ();
+       }
+
+      if (wipe_ball == 0
+         && unsmob_grob (nd->get_grob_property ("dot")))
+       {
+         unsmob_grob (nd->get_grob_property ("dot"))->suicide ();
        }
     }
   else if (close_half_collide && !touch)
@@ -411,7 +420,7 @@ Note_collision_interface::forced_shift (Grob *me)
     {
       Grob * se = unsmob_grob (ly_car (s));
 
-      SCM force =  se->remove_grob_property ("force-hshift");
+      SCM force =  se->get_grob_property ("force-hshift");
       if (gh_number_p (force))
        {
          tups = gh_cons (gh_cons (se->self_scm (), force),
@@ -431,9 +440,8 @@ Note_collision_interface::add_column (Grob*me,Grob* ncol)
 
 
 ADD_INTERFACE (Note_collision_interface, "note-collision-interface",
-  "An object that handles collisions between notes with different stem
-directions and horizontal shifts. Most of the interesting properties
-are to be set in @ref{note-column-interface}: these are
-@code{force-hshift} and @code{horizontal-shift}.
-",
-  "merge-differently-dotted merge-differently-headed collision-done");
+  "An object that handles collisions between notes with different stem " 
+"directions and horizontal shifts. Most of the interesting properties "
+"are to be set in @ref{note-column-interface}: these are "
+"@code{force-hshift} and @code{horizontal-shift}. ",
+  "merge-differently-dotted merge-differently-headed positioning-done");