]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/key-engraver.cc
CueClefs: Use middleCClefPosition in the key engraver
[lilypond.git] / lily / key-engraver.cc
index db223e66061c8fc3dcf75e2bf0d8414cbe21ac78..2264e27876a4e5473cda92b2328ac0ebaedccb55 100644 (file)
@@ -72,8 +72,12 @@ Key_engraver::create_key (bool is_default)
       item_ = make_item ("KeySignature",
                         key_event_ ? key_event_->self_scm () : SCM_EOL);
 
+      /* Use middleCClefPosition rather than middleCPosition, because cue
+       * notes with a different clef will modify middleCPosition. The 
+       * Key signature, however, should still be printed at the original
+       * position. */
       item_->set_property ("c0-position",
-                          get_property ("middleCPosition"));
+                          get_property ("middleCClefPosition"));
 
       SCM last = get_property ("lastKeySignature");
       SCM key = get_property ("keySignature");
@@ -230,7 +234,8 @@ ADD_TRANSLATOR (Key_engraver,
                "keyAlterationOrder "
                "keySignature "
                "lastKeySignature "
-               "printKeyCancellation ",
+               "printKeyCancellation "
+               "middleCClefPosition ",
                
                /* write */
                "keySignature "