]> git.donarmstrong.com Git - lilypond.git/commitdiff
''
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 12 Jun 2002 22:04:36 +0000 (22:04 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 12 Jun 2002 22:04:36 +0000 (22:04 +0000)
ChangeLog
lily/key-engraver.cc

index c3df0498356d5be8ff9f00ecd20c57a830b79f21..1a3e0505040e4f43fe60c21c0a886a14bce7c437 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-06-13  Han-Wen  <hanwen@cs.uu.nl>
+
+       * lily/key-engraver.cc (try_music): read request only once. Don't
+       overwrite lastKeySignature. Call create_key() only once. This
+       fixes a bug with multiple equal key changes on polyphonic staffs.
+
 2002-06-12  Mats Bengtsson  <mats.bengtsson@s3.kth.se>
 
        * scm/grob-description.scm: Add side-position-interface to TextSpanner
index d0345c0040b81e16e98cdf6e79cadb1ffbbcb466..65abe52d7ceb0c6d830f56df47130ff3275d3b86 100644 (file)
@@ -37,7 +37,7 @@ protected:
   virtual bool try_music (Music *req_l);
   virtual void stop_translation_timestep ();
   virtual void start_translation_timestep ();
-  virtual void create_grobs ();
+  virtual void process_music ();
   virtual void acknowledge_grob (Grob_info);
 };
 
@@ -92,9 +92,16 @@ Key_engraver::try_music (Music * req_l)
          keyreq_l_->origin ()->warning (_ ("This was the other key definition."));       
          return false;
        }
-      keyreq_l_ = kc;
-      read_req (keyreq_l_);
 
+      if (!keyreq_l_)
+       {
+         /*
+           do this only once, just to be on the safe side.
+           */      
+         keyreq_l_ = kc;
+         read_req (keyreq_l_);
+       }
+      
       return true;
     }   
   return  false;
@@ -121,7 +128,7 @@ Key_engraver::acknowledge_grob (Grob_info info)
 
 
 void
-Key_engraver::create_grobs ()
+Key_engraver::process_music ()
 {
   if (keyreq_l_ ||
       get_property ("lastKeySignature") != get_property ("keySignature"))
@@ -163,8 +170,11 @@ Key_engraver::read_req (Key_change_req const * r)
     if (gh_scm2int (ly_cdar (s)))
       accs = gh_cons (ly_car (s), accs);
 
+#if 0
   daddy_trans_l_->set_property ("lastKeySignature",
                                get_property ("keySignature"));
+#endif
+  
   daddy_trans_l_->set_property ("keySignature", accs);
 }