]> git.donarmstrong.com Git - lilypond.git/commitdiff
Cleans the selector of "reduced hole" noteheads.
authorBertrand Bordage <bordage.bertrand@gmail.com>
Sat, 17 Sep 2011 21:07:14 +0000 (23:07 +0200)
committerBertrand Bordage <bordage.bertrand@gmail.com>
Sat, 17 Sep 2011 21:33:30 +0000 (23:33 +0200)
This wasn't working with uncommon staves.

lily/mensural-ligature.cc
lily/note-head.cc

index aad23357d8d92e49533f9e9440eade2e78f3c245..4b43c686077eb5a2dbfdb1917f600694150f95e7 100644 (file)
@@ -172,11 +172,10 @@ internal_brew_primitive (Grob *me)
       if (out.is_empty ())
         index = prefix + "d";
       out = fm->find_by_name (index + "r" + suffix);
-      if (!out.is_empty () && scm_is_false (
-                                scm_zero_p (
-                                  scm_modulo (
-                                    me->get_property ("staff-position"),
-                                    scm_from_int (2)))))
+      if (!out.is_empty ()
+          && !Staff_symbol_referencer::on_line
+              (me,
+               robust_scm2int (me->get_property ("staff-position"), 0)))
         index += "r";
       out = fm->find_by_name (index + suffix);
       break;
index 0ddba1fe1390353140eda215e1f833b609d7c1a1..de22c1c8cd3960b829e1b04e10b607de7415ae20 100644 (file)
@@ -67,10 +67,10 @@ internal_print (Grob *me, string *font_char)
     }
 
   out = fm->find_by_name (idx_either + "r" + suffix);
-  if (!out.is_empty () && scm_is_false (
-                            scm_zero_p (
-                              scm_modulo (me->get_property ("staff-position"),
-                                          scm_from_int (2)))))
+  if (!out.is_empty ()
+        && !Staff_symbol_referencer::on_line
+             (me,
+              robust_scm2int (me->get_property ("staff-position"), 0)))
       idx_either += "r";
 
   idx_either += suffix;