]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/note-column.cc
* Documentation/windows/zlily-profile.sh:
[lilypond.git] / lily / note-column.cc
index d35b6da16f67ade0181924527947d0be94cfa1b8..9e6c4cdc1c1ab2a7cf4ff878c2e740bc67116c67 100644 (file)
@@ -16,6 +16,7 @@
 #include "staff-symbol-referencer.hh"
 #include "rest.hh"
 #include "note-head.hh"
+#include "accidental-placement.hh"
 
 bool
 Note_column::rest_b (Grob*me) 
@@ -126,11 +127,6 @@ Note_column::first_head (Grob*me)
   return st?  Stem::first_head (st): 0; 
 }
 
-bool
-Note_column::has_interface (Grob*me)
-{
-  return me && me->has_interface (ly_symbol2scm ("note-column-interface"));
-}
 
 /*
   Return the first Accidentals grob that we find in a note-head. 
@@ -139,15 +135,23 @@ Grob*
 Note_column::accidentals (Grob *me)
 {
   SCM heads = me->get_grob_property ("note-heads");
+  Grob * acc = 0;
   for (;gh_pair_p (heads); heads =gh_cdr (heads))
     {
       Grob * h = unsmob_grob (gh_car (heads));
-      Grob *a = h ? unsmob_grob(h->get_grob_property ("accidentals-grob")) : 0;
-      if (a)
-       return a;
+      acc = h ? unsmob_grob (h->get_grob_property ("accidental-grob")) : 0;
+      if (acc)
+       break;
     }
 
-  return 0;
+  if (!acc)
+    return 0;
+  
+  if (Accidental_placement::has_interface (acc->get_parent (X_AXIS)))
+    return acc->get_parent (X_AXIS);
+
+  /* compatibility. */
+  return  acc;
 }