]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/spacing-engraver.cc (finalize): robustifications.
authorhanwen <hanwen>
Wed, 4 Feb 2004 01:59:28 +0000 (01:59 +0000)
committerhanwen <hanwen>
Wed, 4 Feb 2004 01:59:28 +0000 (01:59 +0000)
* scm/part-combiner.scm: rewrite.

ChangeLog
lily/axis-group-engraver.cc
lily/separating-line-group-engraver.cc
lily/slur.cc
lily/spacing-engraver.cc
lily/staff-symbol-engraver.cc
lily/system-start-delimiter-engraver.cc
lily/vertical-align-engraver.cc
ly/declarations-init.ly
scm/part-combiner.scm

index 24b24a023ec6ff6ef2e9f548ecea01876ccea8f6..c26e63774799c2c6e8b6f8f1b02b35eecebcfdd6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2004-02-04  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/spacing-engraver.cc (finalize): robustifications.
+
        * input/regression/new-part-combine-solo-global.ly: new file.
 
        * scm/part-combiner.scm: rewrite.
index 0997081c8e23e6b5a41222c687bf4c01a6cda12a..dfc19dae20a92cf1b62e143213277ee7cacceb69 100644 (file)
@@ -66,10 +66,7 @@ void
 Axis_group_engraver::finalize ()
 {
   if (!staffline_)
-    {
-      programming_error ("Huh? This context never lived?");
-      return ;
-    }
+    return ;
   
   String type = get_daddy_grav ()->context_name ();
   SCM dims = get_property ("verticalExtent");
index f5b909cefee1ac81a9056eb77b59159264843453..fe2d011a5a67a3e6c8c7f9e50ec3aec272fbfb14 100644 (file)
@@ -83,6 +83,9 @@ Separating_line_group_engraver::process_music ()
 void
 Separating_line_group_engraver::finalize ()
 {
+  if (!sep_span_)
+    return ;
+  
   SCM ccol = get_property ("currentCommandColumn");
   Grob *column = unsmob_grob (ccol);
   
index 4f763205d5ffab24ca75154b1ad798fc5cba930b..8d69ddb2c275775abdd8e28288fd84d711a12473 100644 (file)
@@ -531,7 +531,7 @@ Slur::height (SCM smob, SCM ax)
   SCM mol = me->get_uncached_molecule ();
   Interval ext;
   if (Molecule * m = unsmob_molecule (mol))
-    ext = m->extent= (a);
+    ext = m->extent (a);
   return ly_interval2scm (ext);
 }
 
index 5e1f6371b56699b55386e2a503873b25c0d1b183..a5c42eaf2a58cbae930e6b75b4cf37abc5ad8624 100644 (file)
@@ -83,13 +83,18 @@ Spacing_engraver::process_music ()
       announce_grob(spacing_, SCM_EOL);
     }
 }
+
 void
 Spacing_engraver::finalize ()
 {
-  Grob * p = unsmob_grob (get_property ("currentCommandColumn"));
-  spacing_->set_bound (RIGHT, p);
-  typeset_grob (spacing_);
-  spacing_ =0;
+  if (spacing_)
+    {
+      Grob * p = unsmob_grob (get_property ("currentCommandColumn"));
+  
+      spacing_->set_bound (RIGHT, p);
+      typeset_grob (spacing_);
+      spacing_ =0;
+    }
 }
 
 void
index bdefdd9cdb72059fb7dcbcc36ab65b9a1110f4b3..8d5e1911d1af9ae376fc8d22cf151587263acbeb 100644 (file)
@@ -56,8 +56,11 @@ Staff_symbol_engraver::process_music ()
 void
 Staff_symbol_engraver::finalize ()
 {
-  span_->set_bound (RIGHT,unsmob_grob (get_property ("currentCommandColumn")));
-  typeset_grob (span_);
+  if (span_)
+    {
+      span_->set_bound (RIGHT,unsmob_grob (get_property ("currentCommandColumn")));
+      typeset_grob (span_);
+    }
   span_ =0;
 }
 
index f5865c343c1277855af8cf7f02c7f384f85c2779..10bab1bb73ad3c3161f3973281f3ac84c063f405 100644 (file)
@@ -82,8 +82,11 @@ System_start_delimiter_engraver::process_music ()
 void
 System_start_delimiter_engraver::finalize ()
 {
-  delim_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn")));
-  typeset_grob (delim_);
+  if (delim_)
+    {
+      delim_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn")));
+      typeset_grob (delim_);
+    }
 }
 
 ENTER_DESCRIPTION(System_start_delimiter_engraver,
index e8929f23fde821dceadab2327940f2e4ab981599..51a516db0b9cd5e1b7e8fcd039c8c5342191cff9 100644 (file)
@@ -37,19 +37,21 @@ Vertical_align_engraver::process_music ()
     {
       valign_ =make_spanner ("VerticalAlignment");
       valign_->set_bound (LEFT,unsmob_grob (get_property ("currentCommandColumn")));
-      announce_grob(valign_ , SCM_EOL);
+      announce_grob (valign_ , SCM_EOL);
     }
 }
 
 void
 Vertical_align_engraver::finalize ()
 {
-  valign_->set_bound (RIGHT,unsmob_grob (get_property ("currentCommandColumn")));
-  typeset_grob (valign_);
-  valign_ =0;
+  if (valign_)
+    {
+      valign_->set_bound (RIGHT,unsmob_grob (get_property ("currentCommandColumn")));
+      typeset_grob (valign_);
+      valign_ =0;
+    }
 }
 
-
 bool
 Vertical_align_engraver::qualifies_b (Grob_info i) const
 {
index 3007e61932d4950f6e4805ff394b7795f292bbe7..a321fddf3a81adfe7eaf1f69d18ece3d6f536b47 100644 (file)
@@ -120,6 +120,7 @@ partCombineListener = \paper {
          \type "Recording_group_engraver"
          recordEventSequence = #notice-the-events-for-pc
  }
+ \translator { \ScoreContext skipTypesetting = ##t }
 }
 
 #(set-part-combine-listener partCombineListener)
index 44da6ab139e441adf1a4f33192bb29dd6d94b466..2fa2d51d76d3a13676cb9c98d9b2ff4ec06801d4 100644 (file)
@@ -258,7 +258,7 @@ Voice-state objects
 
   
   (let*
-      ((pc-debug #t)
+      ((pc-debug #f)
        (chord-threshold 8)
        (voice-state-vec1 (make-voice-states evl1))
        (voice-state-vec2 (make-voice-states evl2))
@@ -408,7 +408,6 @@ Only set if not set previously.
                  ((notes1 (note-events vs1)) 
                   (notes2 (note-events vs2))
                   )
-
                (cond
                 ((and
                   (= 1 (length notes1))
@@ -422,8 +421,10 @@ Only set if not set previously.
                   (= 0 (length notes2)))
                  (set! (configuration now-state) 'unisilence)))
 
-               (analyse-a2 (1+ ri))
-               )))))
+               ))
+         (analyse-a2 (1+ ri))
+
+         )))
        
    (define (analyse-solo12 ri)
     
@@ -441,8 +442,8 @@ Only set if not set previously.
      (define (put-range x a b)
        (do
           ((i a (1+ i)))
-          ((> i b))
-        (set! (configuration (vector-ref result i) x))
+          ((> i b) b)
+        (set! (configuration (vector-ref result i)) x)
         ))
      (define (put x)
        (set! (configuration (vector-ref result ri)) x))
@@ -515,7 +516,7 @@ Only set if not set previously.
    (analyse-spanner-states voice-state-vec1)
    (analyse-spanner-states voice-state-vec2)
 
-   (if #t
+   (if #f
        (begin
        (display voice-state-vec1)
        (display "***\n")
@@ -526,8 +527,8 @@ Only set if not set previously.
        ))
      
    (analyse-time-step 0)
-   (display result)
    (analyse-a2 0)
+;   (display result)
    (analyse-solo12 0)
 ;   (if pc-debug (display result))