From: fred Date: Sun, 24 Mar 2002 19:45:23 +0000 (+0000) Subject: lilypond-0.0.67 X-Git-Tag: release/1.5.59~4609 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2e1c01788e992f960c13a5e3cbc8c6ba61071784;p=lilypond.git lilypond-0.0.67 --- diff --git a/lily/local-key-reg.cc b/lily/local-key-reg.cc index 9569ab10a4..8ce3577f6c 100644 --- a/lily/local-key-reg.cc +++ b/lily/local-key-reg.cc @@ -23,26 +23,39 @@ Local_key_register::Local_key_register() void Local_key_register::pre_move_processing() { + Local_key_item *key_item_p = 0; if (mel_l_arr_.size()) { - Local_key_item *key_item_p = 0; for (int i=0; i < mel_l_arr_.size(); i++) { Item * support_l = support_l_arr_[i]; - Note_req * note_l = mel_l_arr_[i]; + if (tied_l_arr_.find_l(support_l) && - !forced_l_arr_.find_l(support_l)) + !note_l->forceacc_b_) continue; + if( !note_l->forceacc_b_ && + local_key_.oct(note_l->octave_i_).acc(note_l->notename_i_) + == note_l->accidental_i_) + continue; + + + if (!key_item_p) key_item_p = new Local_key_item(*get_staff_info().c0_position_i_l_); key_item_p->add(note_l); - key_item_p->add(support_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) - typeset_element(key_item_p); + + } + if (key_item_p) { + for(int i=0; i < support_l_arr_.size(); i++) + key_item_p->add_support(support_l_arr_[i]); + + typeset_element(key_item_p); } + mel_l_arr_.set_size(0); tied_l_arr_.set_size(0); support_l_arr_.set_size(0); @@ -53,18 +66,13 @@ void Local_key_register::acknowledge_element(Score_elem_info info) { Score_elem * elem_l = info.elem_l_; - if (info.req_l_->note()) { - Note_req * note_l = info.req_l_->note(); + if (info.req_l_->musical() && info.req_l_->musical()->note()) { + Note_req * note_l = info.req_l_->musical()->note(); Item * item_l = info.elem_l_->item(); - if( note_l->forceacc_b_ || - local_key_.oct(note_l->octave_i_).acc(note_l->notename_i_) - != note_l->accidental_i_) { - mel_l_arr_.push(note_l ); - support_l_arr_.push(item_l); - if (note_l->forceacc_b_) - forced_l_arr_.push(item_l); - } + mel_l_arr_.push(note_l ); + support_l_arr_.push(item_l); + } else if (info.req_l_->command() && info.req_l_->command()->keychange()) { Key_register * key_reg_l = diff --git a/lily/lookup.cc b/lily/lookup.cc index bc6af68d60..dae5ad37b5 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -248,7 +248,7 @@ Lookup::vbrace(Real &y) const y = 67 *2 PT; } - int idx = (y/2.0 - 20 ) + 148; + int idx = int(rint((y/2.0 - 20 ) + 148)); Symbol s = (*symtables_)("param")->lookup("brace");