From d800cbd058636206e07d37a6b50c599d60ccbda4 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 23:57:41 +0000 Subject: [PATCH] lilypond-1.3.106 --- lily/music-iterator.cc | 14 ++++++++++++-- lily/note-heads-engraver.cc | 26 +++++++++++++++++++++++--- lily/request-chord-iterator.cc | 12 +++--------- 3 files changed, 38 insertions(+), 14 deletions(-) diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index 4a2c2ec95e..08f454fae1 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -185,8 +185,18 @@ Music_iterator::init_translator (Music *m, Translator_group *report_l) music_l_ = m; if (Context_specced_music * csm =dynamic_cast (m)) { - Translator_group* a =report_l-> - find_create_translator_l (csm->translator_type_str_, csm->translator_id_str_); + SCM ct = csm->get_mus_property ("context-type"); + String c_type; + if (gh_string_p (ct)) + c_type = ly_scm2string (ct); + + String c_id; + SCM ci = csm->get_mus_property ("context-id"); + if (gh_string_p (ci)) + c_id = ly_scm2string (ci); + + Translator_group* a + =report_l->find_create_translator_l (c_type, c_id); set_translator (a); diff --git a/lily/note-heads-engraver.cc b/lily/note-heads-engraver.cc index 9bcd1dad7b..ec47cb0442 100644 --- a/lily/note-heads-engraver.cc +++ b/lily/note-heads-engraver.cc @@ -5,15 +5,14 @@ */ #include "rhythmic-head.hh" -#include "engraver.hh" #include "paper-def.hh" #include "musical-request.hh" #include "dots.hh" #include "dot-column.hh" #include "staff-symbol-referencer.hh" -#include "engraver.hh" -#include "pqueue.hh" #include "item.hh" +#include "score-engraver.hh" +#include "warn.hh" /** make balls and rests @@ -29,6 +28,7 @@ public: Note_heads_engraver(); protected: + virtual void do_post_move_processing (); virtual bool do_try_music (Music *req_l) ; virtual void do_process_music(); virtual void do_pre_move_processing(); @@ -129,6 +129,26 @@ Note_heads_engraver::do_pre_move_processing() note_req_l_arr_.clear (); } +void +Note_heads_engraver::do_post_move_processing () +{ + /* TODO:make this settable? + */ + if (note_end_mom_ > now_mom()) + { + Score_engraver * e = 0; + Translator * t = daddy_grav_l (); + for (; !e && t; t = t->daddy_trans_l_) + { + e = dynamic_cast (t); + } + + if (!e) + programming_error ("No score engraver!"); + else + e->forbid_breaks (); // guh. Use properties! + } +} diff --git a/lily/request-chord-iterator.cc b/lily/request-chord-iterator.cc index aaeeeecac7..79df69f6da 100644 --- a/lily/request-chord-iterator.cc +++ b/lily/request-chord-iterator.cc @@ -71,15 +71,9 @@ Request_chord_iterator::process (Moment m) { Music *mus = unsmob_music (gh_car (s)); - if (Request * req_l = dynamic_cast (mus)) - { - bool gotcha = try_music (req_l); - if (!gotcha) - req_l->origin ()->warning (_f ("Junking request: `%s'", classname( req_l))); - } - else - mus->origin ()->warning (_f ("Huh? Not a Request: `%s'", - classname (mus))); + bool gotcha = try_music (mus); + if (!gotcha) + mus->origin ()->warning (_f ("Junking request: `%s'", classname(mus))); } } skip (m); -- 2.39.5