]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/hara-kiri-group-spanner.cc
Small fix from mailist.
[lilypond.git] / lily / hara-kiri-group-spanner.cc
index f00434346dbac33c5147c9d7b1933eba374e0134..3a686dfcf03974481f0f4ccb174c83544b8dad6e 100644 (file)
@@ -43,7 +43,7 @@ Hara_kiri_group_spanner::consider_suicide (Grob *me)
           == 0)) 
     return;
 
-  Link_array<Grob> childs;
+  vector<Grob*> childs;
   Axis_group_interface::get_children (me, &childs);
   for (vsize i = 0; i < childs.size (); i++)
     childs[i]->suicide ();
@@ -58,26 +58,30 @@ Hara_kiri_group_spanner::consider_suicide (Grob *me)
   We can't rely on offsets and dimensions of elements in a hara-kiri
   group. Use a callback to make sure that hara-kiri has been done
   before asking for offsets.  */
-MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner, force_hara_kiri_callback, 2);
+MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner, after_line_breaking, 1);
 SCM
-Hara_kiri_group_spanner::force_hara_kiri_callback (SCM smob, SCM axis)
+Hara_kiri_group_spanner::after_line_breaking (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
-  (void) axis;
+  consider_suicide (me);
+  return SCM_UNSPECIFIED;
+}
 
-  assert (scm_to_int (axis) == Y_AXIS);
+MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner, force_hara_kiri_callback, 1);
+SCM
+Hara_kiri_group_spanner::force_hara_kiri_callback (SCM smob)
+{
+  Grob *me = unsmob_grob (smob);
   consider_suicide (me);
   return scm_from_double (0.0);
 }
 
-MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner, force_hara_kiri_in_parent_callback, 2);
+MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner, force_hara_kiri_in_y_parent_callback, 1);
 SCM
-Hara_kiri_group_spanner::force_hara_kiri_in_parent_callback (SCM smob, SCM axis)
+Hara_kiri_group_spanner::force_hara_kiri_in_y_parent_callback (SCM smob)
 {
   Grob *daughter = unsmob_grob (smob);
-  Axis a = (Axis) scm_to_int (axis);
-  assert (a == Y_AXIS);
-  force_hara_kiri_callback (daughter->get_parent (a)->self_scm (), axis);
+  force_hara_kiri_callback (daughter->get_parent (Y_AXIS)->self_scm ());
   return scm_from_double (0.0);
 }