]> git.donarmstrong.com Git - lilypond.git/commitdiff
(typeset_grob): warn if adding twice.
authorhanwen <hanwen>
Thu, 15 Jan 2004 18:26:40 +0000 (18:26 +0000)
committerhanwen <hanwen>
Thu, 15 Jan 2004 18:26:40 +0000 (18:26 +0000)
ChangeLog
lily/grob.cc
lily/system.cc

index 4e37cb824b91ab568ff77f35d973e4300f428f79..66d7b6f78d4f54a97489eeede81b536faf2b36a6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2004-01-15  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/system.cc (typeset_grob): warn if adding twice.
+
        * lily/sequential-iterator.cc (run_always): implement run_always().
 
        * input/mutopia/F.Schubert/standchen.ly: use newaddlyrics. 
index 3253cd40b132ae8e10466051cb249414dd36e8ac..ffee9d7c3d010618a7eee7c3bf76f0db5a61f959 100644 (file)
@@ -133,7 +133,7 @@ Grob::Grob (Grob const&s)
    */
   
   status_ = s.status_;
-  pscore_ = s.pscore_;
+  pscore_ = 0;
 
   smobify_self ();
 
index 983555cbe2c2393c7674ab7c56dacb9a0d009b3f..a776eeba9a4f5f45c0a5ca78b6fe33a21926263b 100644 (file)
@@ -64,6 +64,9 @@ System::spanner_count () const
 void
 System::typeset_grob (Grob * elem)
 {
+  if (elem->pscore_)
+    programming_error ("Adding element twice.");
+  
   elem->pscore_ = pscore_;
   Pointer_group_interface::add_grob (this, ly_symbol2scm ("all-elements"),elem);
   scm_gc_unprotect_object (elem->self_scm ());
@@ -265,11 +268,9 @@ System::break_into_pieces (Array<Column_x_positions> const &breaking)
     }
 }
 
-
 void
 System::output_molecule (SCM expr, Offset o)
 {
-
   while (1)
     {
       if (!gh_pair_p (expr))