diff options
author | Jan Nieuwenhuizen <janneke@gnu.org> | 2010-06-14 21:16:35 +0200 |
---|---|---|
committer | Jan Nieuwenhuizen <janneke@gnu.org> | 2010-08-24 15:24:25 +0200 |
commit | 89192bb6e7e71cc438817d42f189142d4e44cc2b (patch) | |
tree | 5aa1a1a4c706100863b8edebb9b14b6ba24aac7c /lily | |
parent | 7dc057ffea8d7226a4fca7f186fcb74df4dda2dd (diff) |
Metronome-mark: with multi measure rest: align at bar.
Diffstat (limited to 'lily')
-rw-r--r-- | lily/default-bar-line-engraver.cc | 1 | ||||
-rw-r--r-- | lily/metronome-engraver.cc | 24 | ||||
-rw-r--r-- | lily/part-combine-engraver.cc | 1 | ||||
-rw-r--r-- | lily/timing-translator.cc | 1 |
4 files changed, 16 insertions, 11 deletions
diff --git a/lily/default-bar-line-engraver.cc b/lily/default-bar-line-engraver.cc index c5680c3089..aee53570f3 100644 --- a/lily/default-bar-line-engraver.cc +++ b/lily/default-bar-line-engraver.cc @@ -19,7 +19,6 @@ #include "engraver.hh" #include "context.hh" -#include "multi-measure-rest.hh" #include "grob.hh" #include "warn.hh" diff --git a/lily/metronome-engraver.cc b/lily/metronome-engraver.cc index d71452e286..e6a61f175f 100644 --- a/lily/metronome-engraver.cc +++ b/lily/metronome-engraver.cc @@ -39,6 +39,7 @@ public: protected: Item *text_; Grob *support_; + Grob *bar_; SCM last_duration_; SCM last_count_; @@ -57,6 +58,7 @@ Metronome_mark_engraver::Metronome_mark_engraver () { text_ = 0; support_ = 0; + bar_ = 0; last_duration_ = SCM_EOL; last_count_ = SCM_EOL; last_text_ = SCM_EOL; @@ -76,10 +78,14 @@ Metronome_mark_engraver::acknowledge_break_aligned (Grob_info info) Grob *g = info.grob (); if (text_ - && !support_ - && scm_member (g->get_property_data ("break-align-symbol"), - text_->get_property_data ("break-align-symbols")) - != SCM_BOOL_F) + && g->get_property_data ("break-align-symbol") + == ly_symbol2scm ("staff-bar")) + bar_ = g; + else if (text_ + && !support_ + && scm_member (g->get_property_data ("break-align-symbol"), + text_->get_property_data ("break-align-symbols")) + != SCM_BOOL_F) { support_ = g; text_->set_parent (g, X_AXIS); @@ -99,13 +105,10 @@ Metronome_mark_engraver::acknowledge_grob (Grob_info info) Grob *g = info.grob (); if (text_ - && !support_ && scm_member (grob_name_scm (g), text_->get_property_data ("non-break-align-symbols")) != SCM_BOOL_F) - { text_->set_parent (g, X_AXIS); - } } void @@ -113,7 +116,11 @@ Metronome_mark_engraver::stop_translation_timestep () { if (text_) { - if (!support_) + if (text_->get_parent (X_AXIS) + && text_->get_parent (X_AXIS)->internal_has_interface (ly_symbol2scm ("multi-measure-rest-interface")) + && bar_) + text_->set_parent (bar_, X_AXIS); + else if (!support_) { /* Gardner Read "Music Notation", p.278 @@ -131,6 +138,7 @@ Metronome_mark_engraver::stop_translation_timestep () grob_list_to_grob_array (get_property ("stavesFound"))); text_ = 0; support_ = 0; + bar_ = 0; } } diff --git a/lily/part-combine-engraver.cc b/lily/part-combine-engraver.cc index cebee4ed9e..bbc0d059e5 100644 --- a/lily/part-combine-engraver.cc +++ b/lily/part-combine-engraver.cc @@ -20,7 +20,6 @@ */ #include "engraver.hh" -#include "multi-measure-rest.hh" #include "note-head.hh" #include "side-position-interface.hh" #include "stem.hh" diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc index a7f986fb10..8581d2afd1 100644 --- a/lily/timing-translator.cc +++ b/lily/timing-translator.cc @@ -22,7 +22,6 @@ #include "warn.hh" #include "translator-group.hh" #include "global-context.hh" -#include "multi-measure-rest.hh" void Timing_translator::stop_translation_timestep () |