]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.106
authorfred <fred>
Tue, 26 Mar 2002 23:57:41 +0000 (23:57 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:57:41 +0000 (23:57 +0000)
lily/music-iterator.cc
lily/note-heads-engraver.cc
lily/request-chord-iterator.cc

index 4a2c2ec95ec5468b9da751d264899ac854f3fe7c..08f454fae1e303b8d255c0579729d7f2876735ad 100644 (file)
@@ -185,8 +185,18 @@ Music_iterator::init_translator (Music *m, Translator_group *report_l)
   music_l_ = m;
   if (Context_specced_music * csm =dynamic_cast<Context_specced_music *> (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);
       
index 9bcd1dad7b087c7d56902b168ea7da788830108d..ec47cb0442d293f67f874d045d35a240ab535cf1 100644 (file)
@@ -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<Score_engraver*> (t);
+       }
+
+      if (!e)
+       programming_error ("No score engraver!");
+      else
+       e->forbid_breaks ();    // guh. Use properties!
+    }
+}
 
 
 
index aaeeeecac7bcb5427fad13d5c56aa341d839d8e3..79df69f6daefd86727f066e54561ea55ff86499b 100644 (file)
@@ -71,15 +71,9 @@ Request_chord_iterator::process (Moment m)
        {
          Music *mus = unsmob_music (gh_car (s));
 
-         if (Request * req_l = dynamic_cast<Request*> (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);