]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/staff-symbol-referencer.cc
Fix #219.
[lilypond.git] / lily / staff-symbol-referencer.cc
index cfde343029a980f20dbf565ac060e20f9d26e4c7..7fe0bf3131679d75ad7aa456547719430f103c1d 100644 (file)
@@ -8,8 +8,8 @@
 
 #include "staff-symbol-referencer.hh"
 
-
 #include "staff-symbol.hh"
+#include "grob.hh"
 #include "output-def.hh"
 #include "libc-extension.hh"
 
@@ -110,7 +110,6 @@ Staff_symbol_referencer::callback (SCM smob)
     {
       Real space = Staff_symbol_referencer::staff_space (me);
       off = scm_to_double (pos) * space / 2.0;
-      me->set_property ("staff-position", scm_from_int (0));
     }
 
   return scm_from_double (off);
@@ -157,7 +156,14 @@ compare_position (Grob *const &a, Grob *const &b)
               - Staff_symbol_referencer::get_position ((Grob *) b));
 }
 
-ADD_INTERFACE (Staff_symbol_referencer, "staff-symbol-referencer-interface",
+bool
+position_less (Grob *const &a, Grob *const &b)
+{
+  return Staff_symbol_referencer::get_position (a)
+    < Staff_symbol_referencer::get_position (b);
+}
+
+ADD_INTERFACE (Staff_symbol_referencer,
               "An object whose Y position is meant relative to a staff "
               "symbol. "
               "These usually have @code{Staff_symbol_referencer::callback} "