]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.63
authorfred <fred>
Tue, 26 Mar 2002 23:23:26 +0000 (23:23 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:23:26 +0000 (23:23 +0000)
lily/include/lily-guile.hh
lily/include/rest-collision.hh
lily/lily-guile.cc
lily/local-key-engraver.cc
lily/rest-collision.cc

index ba9751c4b50f903e4e41409733b675ea5a061cb1..7c91bbd276dbb6c07cb6de6a9eaf4e3ba9056c4b 100644 (file)
@@ -29,6 +29,9 @@
     A ly_B2A (B b);
  */
 SCM ly_str02scm (char const*c);
+SCM ly_deep_copy (SCM);
+
+
 SCM ly_symbol2scm (char const *);
 String ly_scm2string (SCM s);
 String ly_symbol2string (SCM);
index 550ed5e0f45a844239b64c0bb44dee5f913cc2f0..10b8ac01c17aef4f625e4cfd733e602539550b5e 100644 (file)
@@ -20,7 +20,7 @@ public:
     
   Rest_collision(SCM);
 
-  SCM member_before_line_breaking ();
-  static SCM before_line_breaking (SCM);
+  SCM member_after_line_breaking ();
+  static SCM after_line_breaking (SCM);
 };
 #endif // REST_COLLISION_HH
index e40605572296fb36da5a90be2842a53091de9b6e..f02685cf4475384bc15dc1d3b2c55b20d14e1e89 100644 (file)
@@ -404,3 +404,15 @@ init_functions ()
 }
 
 ADD_SCM_INIT_FUNC(funcs, init_functions);
+
+SCM
+ly_deep_copy (SCM l)
+{
+  if (gh_pair_p (l))
+    {
+      return gh_cons (ly_deep_copy (gh_car (l)), ly_deep_copy (gh_cdr (l)));
+    }
+  else
+    return l;
+}
+
index 172961dacf264c9164b4ea34fa727eccd4d0fcb3..302a1a06300c34ace2d8f66380ca532fd2008466 100644 (file)
@@ -208,6 +208,9 @@ Local_key_engraver::acknowledge_element (Score_element_info info)
     }
 }
 
+/*
+  ugh. deep_copy uses lots of space.
+ */
 void
 Local_key_engraver::do_process_music()
 {
@@ -218,11 +221,11 @@ Local_key_engraver::do_process_music()
   if (!mp)
     {
       if (!to_boolean (get_property ("noResetKey")))
-       daddy_trans_l_->set_property ("localKeySignature",  sig);
+       daddy_trans_l_->set_property ("localKeySignature",  ly_deep_copy (sig));
     }
   else if (last_keysig_ != sig) 
     {
-      daddy_trans_l_->set_property ("localKeySignature",  sig);
+      daddy_trans_l_->set_property ("localKeySignature",  ly_deep_copy (sig));
     }
 }
 
index f7474eccb33de0678df690d1ff6115eeb9f5ee9b..a72e0504e30807a98188f432a72c7c813cde513c 100644 (file)
@@ -60,15 +60,16 @@ col2rhythmic_head (Note_column* c)
   return dynamic_cast<Rhythmic_head*> (e);
 }
 
-GLUE_SCORE_ELEMENT(Rest_collision,before_line_breaking);
+GLUE_SCORE_ELEMENT(Rest_collision,after_line_breaking);
+
 SCM
-Rest_collision::member_before_line_breaking ()
+Rest_collision::member_after_line_breaking ()
 {
   Link_array<Note_column> rest_l_arr =
     Pointer_group_interface__extract_elements (this, (Note_column*) 0, "rests");
   Link_array<Note_column> ncol_l_arr =
     Pointer_group_interface__extract_elements (this, (Note_column*) 0, "notes");
-                                     
+
   
   /* 
      handle rest-rest and rest-note collisions