]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/system.cc (get_line):
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 9 Mar 2004 13:12:17 +0000 (13:12 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 9 Mar 2004 13:12:17 +0000 (13:12 +0000)
* lily/paper-outputter.cc (output_line): Fix `between-system-string'.

ChangeLog
lily/include/system.hh
lily/system.cc

index a9bee9d47b6ad1edc4142d561eaac7ba8ff10257..f9dbe2cd376d9ce64b3c8f1c25042cc1ec2f97e8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2004-03-09  Jan Nieuwenhuizen  <janneke@gnu.org>
 
-       * lily/system.cc (get_line): Fix between-systems (NOT).
+       * lily/system.cc (get_line):
+       * lily/paper-outputter.cc (output_line): Fix `between-system-string'.
 
 2004-03-09  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
index 515c9e1b1e9206988d35fc35c641ddbed2355711..911aa0b792fac365016dbf9388c7929c98bab6ca 100644 (file)
@@ -24,7 +24,7 @@ class System : public Spanner
 public:
   int rank_;
   void post_processing ();
-  SCM get_line (bool);
+  SCM get_line ();
   SCM get_lines ();
 
   System (SCM);
index 7ec636b7b5057b90b2ed2eea3f36f188d4f0f135..ac6fc06702291d508a9462ed36897aaeb778e877 100644 (file)
@@ -183,22 +183,15 @@ System::get_lines ()
   
    for (int i = 0; i < line_count; i++)
     {
-      System *system = dynamic_cast<System*> (broken_intos_[i]);
-
       if (verbose_global_b)
        progress_indication ("[");
 
-      // urg between-systems hack
-      bool last = (i + 1 == line_count);
-
+      System *system = dynamic_cast<System*> (broken_intos_[i]);
       system->post_processing ();
-      scm_vector_set_x (lines, scm_int2num (i), system->get_line (last));
+      scm_vector_set_x (lines, scm_int2num (i), system->get_line ());
 
       if (verbose_global_b)
-       {
-         progress_indication (to_string (i));
-         progress_indication ("]");
-       }
+       progress_indication (to_string (i) + "]");
     }
    return lines;
 }
@@ -392,11 +385,15 @@ System::post_processing ()
 }
 
 /* Return line:
-   ((HEIGHT . WIDTH) LINE)
+   ((HEIGHT . WIDTH) LINE)
    LINE: list of ((OFFSET-X . OFFSET-Y) . STENCIL)
+
+   or (!PAGE_LAYOUT):
+     ('between-system-string . STENCIL)
+   
    Maybe make clas/smob?  */
 SCM
-System::get_line (bool is_last)
+System::get_line ()
 {  
   static int const LAYER_COUNT = 3;
   SCM line = SCM_EOL;
@@ -404,26 +401,6 @@ System::get_line (bool is_last)
     line = scm_cons (scm_cons (ly_offset2scm (Offset (0, 0)),
                               me->smobbed_copy ()), line);
 
-  
-#ifndef PAGE_LAYOUT
-  // does not work: (\\par error) - do we really need this at all?
-  if (false && !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++)
@@ -447,6 +424,19 @@ System::get_line (bool is_last)
                                   stil->smobbed_copy ()), line);
       }
 
+#ifndef PAGE_LAYOUT
+  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 (between, stil->smobbed_copy ()), line);
+    }
+#endif
+
   Interval x (extent (this, X_AXIS));
   Interval y (extent (this, Y_AXIS));
   return scm_cons (ly_offset2scm (Offset (x.length (), y.length ())), line);