]> git.donarmstrong.com Git - lilypond.git/commitdiff
make key cancellations independent of extraNatural
authorKeith OHara <k-ohara5a5a@oco.net>
Wed, 9 Feb 2011 10:57:41 +0000 (10:57 +0000)
committerTrevor Daniels <t.daniels@treda.co.uk>
Wed, 9 Feb 2011 10:57:41 +0000 (10:57 +0000)
input/regression/key-signature-cancellation-extra-natural.ly [deleted file]
lily/key-engraver.cc

diff --git a/input/regression/key-signature-cancellation-extra-natural.ly b/input/regression/key-signature-cancellation-extra-natural.ly
deleted file mode 100644 (file)
index 676e1dc..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-\header {
-
-  texidoc = "If @code{extraNatural} is set then keys that are not
-  altered farther away (eg from sharp to double sharp) are
-  cancelled. Otherwise only keys that do not occur in the new key
-  signature are cancelled."  }
-
-
-\version "2.12.0"
-
-\paper {
-  ragged-right = ##t
-}
-{
-  \set Staff.extraNatural = ##f
-  \key fes \major r1
-  \key as \major r1_"No B-natural (#f)"
-  \set Staff.extraNatural = ##t
-  \key gis \major r1
-  \key b \major r1_"with F-natural (#t)"
-
-}
-
index e67247cd8c3c8a188bd40f9fab4363bfcd46f5bf..66b6e00a2b3bf9a2bd07143b2211b08497234360 100644 (file)
@@ -77,7 +77,6 @@ Key_engraver::create_key (bool is_default)
 
       SCM last = get_property ("lastKeySignature");
       SCM key = get_property ("keySignature");
-      bool extranatural = to_boolean (get_property ("extraNatural"));
 
       if ((to_boolean (get_property ("printKeyCancellation"))
           || key == SCM_EOL)
@@ -90,9 +89,8 @@ Key_engraver::create_key (bool is_default)
              SCM new_alter_pair = scm_assoc (scm_caar (s), key);
              Rational old_alter = robust_scm2rational (scm_cdar (s), 0);
              if (new_alter_pair == SCM_BOOL_F
-                 || (extranatural
-                     && (ly_scm2rational (scm_cdr (new_alter_pair)) - old_alter)*old_alter
-                         < Rational (0)))
+                 || ((ly_scm2rational (scm_cdr (new_alter_pair)) - old_alter) * old_alter
+                     < Rational (0)))
                {
                  *tail = scm_cons (scm_car (s), *tail);
                  tail = SCM_CDRLOC (*tail);