diff options
author | David Kastrup <dak@gnu.org> | 2016-06-16 19:12:51 +0200 |
---|---|---|
committer | David Kastrup <dak@gnu.org> | 2016-06-24 09:31:36 +0200 |
commit | a975d6f176453d35367e3fa4808c7061d326a9e7 (patch) | |
tree | 53cbcba5eaebc6c39a065aa2159e1c3d4fb1a988 /lily | |
parent | d862072d207e75b01f157198d8ea90fd360eb210 (diff) |
Issue 4898: Set rhythmic-location early in paper-column-engraver
This makes it possible to refer to rhythmic-location in callbacks
for PaperColumn grobs.
Diffstat (limited to 'lily')
-rw-r--r-- | lily/paper-column-engraver.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lily/paper-column-engraver.cc b/lily/paper-column-engraver.cc index 8cb99ecbb6..0e32f6e644 100644 --- a/lily/paper-column-engraver.cc +++ b/lily/paper-column-engraver.cc @@ -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 |