]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.53
authorfred <fred>
Sun, 24 Mar 2002 20:07:44 +0000 (20:07 +0000)
committerfred <fred>
Sun, 24 Mar 2002 20:07:44 +0000 (20:07 +0000)
Documentation/AUTHORS.pod
lily/include/local-key-grav.hh
lily/local-key-grav.cc

index 3e377f910ea4a1acc20941660bff7b89422c871b..538b9c185249dc2f4c425a0c271feb9c0b6beeeb 100644 (file)
@@ -45,7 +45,7 @@ misc bugfixes, some Beam and Stem code.
 
 mf/ital-*.mf (these were taken from the CM fonts)
 
-=item * Alexandre Oliva <oliva@dcc.unicamp.br>, http://sunsite.unicamp.br/?
+=item * Alexandre Oliva <oliva@dcc.unicamp.br>, http://sunsite.unicamp.br/~oliva
 
 testing
 
index 49de9f82d225e91875b41ee1a4cf5438596f80a6..1602b94d9f12902d2a1926838dbab9ce3838a1dd 100644 (file)
@@ -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_;
index 7201acf173020b1664d7e2f14ceb3d23a5f5e0bd..432e4f20b0fa7dfa3fc6ed0e5b48da0401765bc4 100644 (file)
 #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();