]> git.donarmstrong.com Git - lilypond.git/commitdiff
(extent_callback): remove function
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 24 Jul 2002 15:18:45 +0000 (15:18 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 24 Jul 2002 15:18:45 +0000 (15:18 +0000)
(position_accidentals): do nothing if not live.

ChangeLog
lily/accidental-placement.cc
lily/include/accidental-placement.hh

index 8ca1df5e003a6f9121464764830fb31498e5947f..da93cbba21a13e1059bf0bfef33103b87d38c483 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-07-24  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * lily/accidental-placement.cc (extent_callback): remove function
+       (position_accidentals): do nothing if not live.
+
 2002-07-24  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * input/mutopia/J.S.Bach/baerenreiter-sarabande.ly: Add
index 292f9935512f1195fb6458a994338e7f07dc387b..5cbd46c9f23f179b585591d04c38425f3d242bc4 100644 (file)
@@ -20,22 +20,6 @@ source file of the GNU LilyPond music typesetter
 #include "note-collision.hh"
 #include "accidental-interface.hh"
 
-/*
-  Hmm. why not group-extent? 
- */
-MAKE_SCHEME_CALLBACK(Accidental_placement,extent_callback, 2);
-SCM
-Accidental_placement::extent_callback(SCM s, SCM axis)
-{
-  Grob * me =unsmob_grob (s);
-  Axis a = Axis (gh_scm2int (axis));
-
-  assert (a == X_AXIS);
-
-  SCM w = position_accidentals (me);
-  return w;
-}
-
 MAKE_SCHEME_CALLBACK(Accidental_placement,alignment_callback, 2);
 SCM
 Accidental_placement::alignment_callback(SCM s, SCM )
@@ -224,8 +208,6 @@ stagger_apes (Link_array<Accidental_placement_entry> *apes)
   
 
 /*
-  Return: width as SCM interval.
-
 
   This routine computes placements of accidentals. During
   add_accidental(), accidentals are already grouped by note, so that
@@ -256,6 +238,9 @@ stagger_apes (Link_array<Accidental_placement_entry> *apes)
 SCM
 Accidental_placement::position_accidentals (Grob * me)
 {
+  if (!me->live ())
+    return SCM_UNSPECIFIED;
+  
   SCM accs = me->get_grob_property ("accidentals");
 
   /*
@@ -464,7 +449,7 @@ Accidental_placement::position_accidentals (Grob * me)
   for (int i = apes.size(); i--;)
     delete apes[i];
 
-  return scm_width;
+  return SCM_UNSPECIFIED;
 }
 
 ADD_INTERFACE(Accidental_placement,
index 178075384e50af51cca3301650d1b04c643918b3..da4bc4f56c72d6607bae085d48c5bbccebbb9125 100644 (file)
@@ -16,7 +16,6 @@ class Accidental_placement
 {
 public:
   DECLARE_SCHEME_CALLBACK (alignment_callback, (SCM element, SCM axis));
-  DECLARE_SCHEME_CALLBACK (extent_callback, (SCM element, SCM axis));  
   static void add_accidental (Grob *,Grob* );
 
   static Interval get_relevant_accidental_extent (Grob *me,