From: fred Date: Sun, 24 Mar 2002 20:07:44 +0000 (+0000) Subject: lilypond-0.1.53 X-Git-Tag: release/1.5.59~3324 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a6832057ce163d17918252ff946b5f9cc0d191df;p=lilypond.git lilypond-0.1.53 --- diff --git a/Documentation/AUTHORS.pod b/Documentation/AUTHORS.pod index 3e377f910e..538b9c1852 100644 --- a/Documentation/AUTHORS.pod +++ b/Documentation/AUTHORS.pod @@ -45,7 +45,7 @@ misc bugfixes, some Beam and Stem code. mf/ital-*.mf (these were taken from the CM fonts) -=item * Alexandre Oliva , http://sunsite.unicamp.br/? +=item * Alexandre Oliva , http://sunsite.unicamp.br/~oliva testing diff --git a/lily/include/local-key-grav.hh b/lily/include/local-key-grav.hh index 49de9f82d2..1602b94d9f 100644 --- a/lily/include/local-key-grav.hh +++ b/lily/include/local-key-grav.hh @@ -18,6 +18,7 @@ protected: virtual void do_process_requests(); virtual void acknowledge_element (Score_elem_info); virtual void do_pre_move_processing(); + virtual void do_creation_processing (); public: Key local_key_; Key const *key_C_; diff --git a/lily/local-key-grav.cc b/lily/local-key-grav.cc index 7201acf173..432e4f20b0 100644 --- a/lily/local-key-grav.cc +++ b/lily/local-key-grav.cc @@ -14,12 +14,28 @@ #include "tie.hh" #include "note-head.hh" #include "time-description.hh" +#include "engraver-group.hh" + Local_key_engraver::Local_key_engraver() { key_C_ = 0; } +void +Local_key_engraver::do_creation_processing () +{ + Translator * result = + daddy_grav_l()->get_simple_translator (Key_engraver::static_name()); + + if (!result) + { + warning ("Out of tune! Can't find key engraver"); + } + else + key_C_ = &((Key_engraver*)result->engraver_l ())->key_; +} + void Local_key_engraver::do_pre_move_processing() { @@ -48,6 +64,7 @@ Local_key_engraver::do_pre_move_processing() c0_i = *get_staff_info().c0_position_i_l_; key_item_p = new Local_key_item (c0_i); + } key_item_p->add (note_l); key_item_p->add_support (support_l); @@ -85,22 +102,12 @@ Local_key_engraver::acknowledge_element (Score_elem_info info) mel_l_arr_.push (note_l); support_l_arr_.push (item_l); - } else if (info.req_l_->command() && info.req_l_->command()->keychange ()) { - Key_engraver * key_grav_l = - (Key_engraver*)info.origin_grav_l_arr_[0]; - key_C_ = &key_grav_l->key_; local_key_ = *key_C_; } - else if (elem_l->is_type_b (Key_item::static_name ())) - { - Key_engraver * key_grav_l = - (Key_engraver*)info.origin_grav_l_arr_[0]; - key_C_ = &key_grav_l->key_; - } else if (elem_l->is_type_b (Tie::static_name ())) { Tie * tie_l = (Tie*)elem_l->spanner();