X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fkey-engraver.cc;h=a61d7701d768dbb4c28246ac72743c3d7265303a;hb=5d84bfad4626892bcffd05adcced53c8a2329047;hp=635f293120c4c3bac29327788536ffb0549f2965;hpb=dbaf1e56e37be0e204231c5bf1adcb14bd8ac3b8;p=lilypond.git diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index 635f293120..a61d7701d7 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -46,9 +46,9 @@ protected: void stop_translation_timestep (); void process_music (); - DECLARE_TRANSLATOR_LISTENER (key_change); - DECLARE_ACKNOWLEDGER (clef); - DECLARE_ACKNOWLEDGER (bar_line); + void listen_key_change (Stream_event *); + void acknowledge_clef (Grob_info); + void acknowledge_bar_line (Grob_info); }; void @@ -56,7 +56,8 @@ Key_engraver::finalize () { } -Key_engraver::Key_engraver () +Key_engraver::Key_engraver (Context *c) + : Engraver (c) { key_event_ = 0; item_ = 0; @@ -117,6 +118,7 @@ Key_engraver::create_key (bool is_default) { SCM visibility = get_property ("explicitKeySignatureVisibility"); item_->set_property ("break-visibility", visibility); + item_->set_property ("non-default", SCM_BOOL_T); } } @@ -146,7 +148,8 @@ void Key_engraver::process_music () { if (key_event_ - || get_property ("lastKeyAlterations") != get_property ("keyAlterations")) + || !scm_is_eq (get_property ("lastKeyAlterations"), + get_property ("keyAlterations"))) create_key (false); }