From: fred Date: Sun, 24 Mar 2002 20:09:38 +0000 (+0000) Subject: lilypond-0.1.56 X-Git-Tag: release/1.5.59~3214 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f5cead047d3c38584037c29fd818ade16fd34229;p=lilypond.git lilypond-0.1.56 --- diff --git a/VERSION b/VERSION index 5532217ea8..80011142cc 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ MAJOR_VERSION=0 MINOR_VERSION=1 -PATCH_LEVEL=55 +PATCH_LEVEL=56 MY_PATCH_LEVEL= # now used as shell script in configure too diff --git a/lily/include/local-key-grav.hh b/lily/include/local-key-grav.hh index 1602b94d9f..d7c37829bb 100644 --- a/lily/include/local-key-grav.hh +++ b/lily/include/local-key-grav.hh @@ -13,13 +13,16 @@ #include "parray.hh" struct Local_key_engraver : Engraver { + Local_key_item *key_item_p_; protected: TRANSLATOR_CLONE(Local_key_engraver); virtual void do_process_requests(); virtual void acknowledge_element (Score_elem_info); virtual void do_pre_move_processing(); virtual void do_creation_processing (); + virtual void process_acknowledged (); public: + Key local_key_; Key const *key_C_; Array mel_l_arr_; diff --git a/lily/local-key-grav.cc b/lily/local-key-grav.cc index f136737f90..ec84f240bf 100644 --- a/lily/local-key-grav.cc +++ b/lily/local-key-grav.cc @@ -20,6 +20,7 @@ Local_key_engraver::Local_key_engraver() { key_C_ = 0; + key_item_p_ =0; } void @@ -40,10 +41,9 @@ Local_key_engraver::do_creation_processing () } void -Local_key_engraver::do_pre_move_processing() +Local_key_engraver::process_acknowledged () { - Local_key_item *key_item_p = 0; - if (mel_l_arr_.size()) + if (!key_item_p_ && mel_l_arr_.size()) { for (int i=0; i < mel_l_arr_.size(); i++) { @@ -58,7 +58,7 @@ Local_key_engraver::do_pre_move_processing() local_key_.oct (note_l->octave_i_).acc (note_l->notename_i_) == note_l->accidental_i_) continue; - if (!key_item_p) + if (!key_item_p_) { int c0_i=0; @@ -66,23 +66,28 @@ Local_key_engraver::do_pre_move_processing() if (inf.c0_position_i_l_) c0_i = *get_staff_info().c0_position_i_l_; - key_item_p = new Local_key_item (c0_i); - + key_item_p_ = new Local_key_item (c0_i); + announce_element (Score_elem_info (key_item_p_, 0)); } - key_item_p->add (note_l); - key_item_p->add_support (support_l); + key_item_p_->add (note_l); + key_item_p_->add_support (support_l); local_key_.oct (note_l->octave_i_) .set (note_l->notename_i_, note_l->accidental_i_); } } - if (key_item_p) +} + +void +Local_key_engraver::do_pre_move_processing() +{ + if (key_item_p_) { for (int i=0; i < support_l_arr_.size(); i++) - key_item_p->add_support (support_l_arr_[i]); - - announce_element (Score_elem_info (key_item_p, 0)); // ugh ugh ugh - typeset_element (key_item_p); + key_item_p_->add_support (support_l_arr_[i]); + + typeset_element (key_item_p_); + key_item_p_ =0; } mel_l_arr_.clear(); @@ -91,9 +96,6 @@ Local_key_engraver::do_pre_move_processing() forced_l_arr_.clear(); } -/* - whoah .. this looks hairy! - */ void Local_key_engraver::acknowledge_element (Score_elem_info info) { @@ -107,7 +109,7 @@ Local_key_engraver::acknowledge_element (Score_elem_info info) support_l_arr_.push (item_l); } else if (info.req_l_->command() - && info.req_l_->command()->keychange ()) + && info.req_l_->command()->keychange () && key_C_) { local_key_ = *key_C_; } diff --git a/mutopia/los-toros-oboe.ly b/mutopia/los-toros-oboe.ly index e213b38dfc..faafa951fb 100644 --- a/mutopia/los-toros-oboe.ly +++ b/mutopia/los-toros-oboe.ly @@ -283,6 +283,7 @@ $staff_hoboone = \type Staff = hoboonestaff < a4 = \paper{ \paper_twenty linewidth= 165.\mm; + gourlay_maxmeasures = 10.0; Score = \translator { \type Score_engraver;