]> git.donarmstrong.com Git - lilypond.git/commitdiff
Don't make paper columns if skipTypesetting = ##t (1336)
authorGraham Percival <graham@percival-music.ca>
Tue, 14 Dec 2010 15:33:07 +0000 (15:33 +0000)
committerGraham Percival <graham@percival-music.ca>
Tue, 14 Dec 2010 15:33:07 +0000 (15:33 +0000)
Patch from Neil, with assistance from Carl.  I'm committing this
now so that I can get another release out.

lily/include/paper-column-engraver.hh
lily/paper-column-engraver.cc
scm/page.scm

index 4150e0625eafbe4f56305fd389938998990e8018..afd28263803daeeab8904075a1adcb01de9a0e89 100644 (file)
@@ -56,6 +56,7 @@ protected:
   Paper_column *musical_column_;
   vector<Item*> items_;
   bool first_;
+  bool made_columns_;
   Moment last_moment_;
 
 public:
index 33690e38a80d1afba55b5ed99abe24e3d5ce9ba1..43b6abefb204869c6151a0f4e1f211eadbf661a1 100644 (file)
@@ -42,6 +42,7 @@ Paper_column_engraver::Paper_column_engraver ()
   breaks_ = 0;
   system_ = 0;
   first_ = true;
+  made_columns_ = false;
 }
 
 void
@@ -50,6 +51,14 @@ Paper_column_engraver::finalize ()
   if (! (breaks_ % 8))
     progress_indication ("[" + to_string (breaks_) + "]");
 
+  if (!made_columns_)
+    {
+      make_columns ();
+      SCM m = now_mom ().smobbed_copy ();
+      command_column_->set_property ("when", m);
+      musical_column_->set_property ("when", m);
+    }
+
   if (command_column_)
     {
       if (!scm_is_symbol (command_column_->get_property ("line-break-permission")))
@@ -199,6 +208,9 @@ Paper_column_engraver::process_music ()
 void
 Paper_column_engraver::stop_translation_timestep ()
 {
+  if (to_boolean (get_property ("skipTypesetting")))
+    return;
+
   SCM m = now_mom ().smobbed_copy ();
   command_column_->set_property ("when", m);
   musical_column_->set_property ("when", m);
@@ -264,11 +276,11 @@ Paper_column_engraver::stop_translation_timestep ()
 void
 Paper_column_engraver::start_translation_timestep ()
 {
-  /*
-    TODO: don't make columns when skipTypesetting is true.
-  */
-  if (!first_)
-    make_columns ();
+  if (!first_ && !to_boolean (get_property ("skipTypesetting")))
+    {
+      make_columns ();
+      made_columns_ = true;
+    }
 }
 
 ADD_ACKNOWLEDGER (Paper_column_engraver, item);
index 409d0134374cac61535de4f15057bfabdd8f753b..539709e60cd2f315a0b346345e497fd48ac5aeef 100644 (file)
        (add-system
        (lambda (system)
          (let* ((stencil (paper-system-stencil system))
-                (y (ly:prob-property system 'Y-offset))
+                (y (ly:prob-property system 'Y-offset 0))
                 (is-title (paper-system-title?
                            system)))
            (add-to-page stencil