]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4898: Set rhythmic-location early in paper-column-engraver
authorDavid Kastrup <dak@gnu.org>
Thu, 16 Jun 2016 17:12:51 +0000 (19:12 +0200)
committerDavid Kastrup <dak@gnu.org>
Fri, 24 Jun 2016 07:31:36 +0000 (09:31 +0200)
This makes it possible to refer to rhythmic-location in callbacks
for PaperColumn grobs.

lily/paper-column-engraver.cc

index 8cb99ecbb6f1f259fc047677014db523f240ecb5..0e32f6e6444200d8b7dbe9887c53c08b5ad26690 100644 (file)
@@ -229,6 +229,18 @@ Paper_column_engraver::stop_translation_timestep ()
   command_column_->set_property ("when", m);
   musical_column_->set_property ("when", m);
 
+  SCM mpos = get_property ("measurePosition");
+  SCM barnum = get_property ("internalBarNumber");
+  if (unsmob<Moment> (mpos)
+      && scm_is_integer (barnum))
+    {
+      SCM where = scm_cons (barnum,
+                            mpos);
+
+      command_column_->set_property ("rhythmic-location", where);
+      musical_column_->set_property ("rhythmic-location", where);
+    }
+
   for (vsize i = 0; i < items_.size (); i++)
     {
       Item *elem = items_[i];
@@ -274,18 +286,6 @@ Paper_column_engraver::stop_translation_timestep ()
 
   first_ = false;
   label_events_.clear ();
-
-  SCM mpos = get_property ("measurePosition");
-  SCM barnum = get_property ("internalBarNumber");
-  if (unsmob<Moment> (mpos)
-      && scm_is_integer (barnum))
-    {
-      SCM where = scm_cons (barnum,
-                            mpos);
-
-      command_column_->set_property ("rhythmic-location", where);
-      musical_column_->set_property ("rhythmic-location", where);
-    }
 }
 
 void