]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/paper-column-engraver.cc
* lily/ various: Introduce stream events of types Prepare,
[lilypond.git] / lily / paper-column-engraver.cc
index 38efaaaf2d644c9d0f2a725fc0a45e6cf5c73bf1..cef0f9e5c055659010f63a2d3afaba9953f4d770 100644 (file)
@@ -53,10 +53,11 @@ Paper_column_engraver::make_columns ()
   */
   Paper_column *p1 = make_paper_column ("NonMusicalPaperColumn");
   Paper_column *p2 = make_paper_column ("PaperColumn");
-
-  SCM m = now_mom ().smobbed_copy ();
-  p1->set_property ("when", m);
-  p2->set_property ("when", m);
+  /* 
+     The columns are timestamped with now_mom () in
+     stop_translation_timestep. Cannot happen now, because the
+     first column is sometimes created before now_mom is initialised.
+  */
 
   set_columns (p1, p2);
 }
@@ -172,6 +173,10 @@ Paper_column_engraver::process_music ()
 void
 Paper_column_engraver::stop_translation_timestep ()
 {
+  SCM m = now_mom ().smobbed_copy ();
+  command_column_->set_property ("when", m);
+  musical_column_->set_property ("when", m);
+
   for (vsize i = 0; i < items_.size (); i++)
     {
       Item *elem = items_[i];
@@ -186,11 +191,8 @@ Paper_column_engraver::stop_translation_timestep ()
 
   if (to_boolean (get_property ("forbidBreak")))
     command_column_->set_property ("line-break-permission", SCM_EOL);
-  else
+  else if (Paper_column::is_breakable (command_column_))
     {
-      if (!Paper_column::is_breakable (command_column_))
-       command_column_->set_property ("line-break-permission", ly_symbol2scm ("allow"));
-      
       breaks_++;
       last_breakable_column_ = command_column_;
       last_breakable_moment_ = now_mom ();