]> git.donarmstrong.com Git - lilypond.git/commitdiff
(get_line): Fix between-systems (NOT).
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 9 Mar 2004 12:14:59 +0000 (12:14 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 9 Mar 2004 12:14:59 +0000 (12:14 +0000)
ChangeLog
lily/include/system.hh
lily/system.cc

index 3a0562692753daf28fdfe921e3a0106afd2ab1c4..a9bee9d47b6ad1edc4142d561eaac7ba8ff10257 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-03-09  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * lily/system.cc (get_line): Fix between-systems (NOT).
+
 2004-03-09  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
        * ly/engraver-init.ly: don't remove slur engraver from DrumVoice.
index 911aa0b792fac365016dbf9388c7929c98bab6ca..515c9e1b1e9206988d35fc35c641ddbed2355711 100644 (file)
@@ -24,7 +24,7 @@ class System : public Spanner
 public:
   int rank_;
   void post_processing ();
-  SCM get_line ();
+  SCM get_line (bool);
   SCM get_lines ();
 
   System (SCM);
index 2c221eefbf1e03784fc4c66893c953be3ae5c19f..5614b017df8be4aead7beff712de58dfc9b09f1b 100644 (file)
@@ -187,34 +187,18 @@ System::get_lines ()
 
       if (verbose_global_b)
        progress_indication ("[");
-      
-      // bool last = (i + 1 == line_count);
+
+      // urg between-systems hack
+      bool last = (i + 1 == line_count);
 
       system->post_processing ();
-      scm_vector_set_x (lines, scm_int2num (i), system->get_line ());
+      scm_vector_set_x (lines, scm_int2num (i), system->get_line (last));
 
       if (verbose_global_b)
        {
          progress_indication (to_string (i));
          progress_indication ("]");
        }
-
-#ifndef PAGE_LAYOUT
-      if (i < line_count - 1)
-       {
-         SCM lastcol =  ly_car (system->get_property ("columns"));
-         Grob*  e = unsmob_grob (lastcol);
-
-         SCM between = ly_symbol2scm ("between-system-string");
-         SCM inter = e->internal_get_property (between);
-         if (gh_string_p (inter))
-           {
-             pscore_->outputter_
-               ->output_scheme (scm_list_n (between, 
-                                            inter, SCM_UNDEFINED));          
-           }
-       }
-#endif                 
     }
    return lines;
 }
@@ -412,7 +396,7 @@ System::post_processing ()
    LINE: list of ((OFFSET-X . OFFSET-Y) . STENCIL)
    Maybe make clas/smob?  */
 SCM
-System::get_line ()
+System::get_line (bool is_last)
 {  
   static int const LAYER_COUNT = 3;
   SCM line = SCM_EOL;
@@ -420,6 +404,26 @@ System::get_line ()
     line = scm_cons (scm_cons (ly_offset2scm (Offset (0, 0)),
                               me->smobbed_copy ()), line);
 
+  
+#ifndef PAGE_LAYOUT
+  // still does not work - do we really need this at all?
+  if (is_last)
+    {
+      SCM lastcol = ly_car (get_property ("columns"));
+      Grob *g = unsmob_grob (lastcol);
+      
+      SCM between = ly_symbol2scm ("between-system-string");
+      SCM inter = g->internal_get_property (between);
+      if (gh_string_p (inter))
+       {
+         Stencil *stil = new Stencil (Box (), scm_list_2 (between, inter));
+         line = scm_cons (scm_cons (ly_offset2scm (Offset (0, 0)),
+                                    stil->smobbed_copy ()),
+                          line);
+       }
+    }
+#endif
+
   /* Output stencils in three layers: 0, 1, 2.  The default layer is
      1.  */
   for (int i = 0; i < LAYER_COUNT; i++)