From fced4c8b6dd10bbf16e7f6196d5ef8eb9e00b1c9 Mon Sep 17 00:00:00 2001 From: Bertrand Bordage Date: Sat, 17 Sep 2011 23:07:14 +0200 Subject: [PATCH] Cleans the selector of "reduced hole" noteheads. This wasn't working with uncommon staves. --- lily/mensural-ligature.cc | 9 ++++----- lily/note-head.cc | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lily/mensural-ligature.cc b/lily/mensural-ligature.cc index aad23357d8..4b43c68607 100644 --- a/lily/mensural-ligature.cc +++ b/lily/mensural-ligature.cc @@ -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; diff --git a/lily/note-head.cc b/lily/note-head.cc index 0ddba1fe13..de22c1c8cd 100644 --- a/lily/note-head.cc +++ b/lily/note-head.cc @@ -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; -- 2.39.2