]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix #200.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 1 Jan 2007 14:00:34 +0000 (15:00 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 1 Jan 2007 14:00:34 +0000 (15:00 +0100)
Add Grob_pq_engraver::process_acknowledged(). This makes correct
busyGrobs setting available earlier in the interpretation cycle.

lily/grob-pq-engraver.cc

index 70a0e7d217e57a82d75a95d8a3cf83a533dd5f62..b36028402e6d3983f69156d7ea656b5e4980acfa 100644 (file)
@@ -32,7 +32,8 @@ protected:
   DECLARE_ACKNOWLEDGER (grob);
   void start_translation_timestep ();
   void stop_translation_timestep ();
-
+  void process_acknowledged ();
+  
   vector<Grob_pq_entry> started_now_;
 };
 
@@ -88,14 +89,8 @@ Grob_pq_engraver::acknowledge_grob (Grob_info gi)
 }
 
 void
-Grob_pq_engraver::stop_translation_timestep ()
+Grob_pq_engraver::process_acknowledged ()
 {
-  Moment now = now_mom ();
-  SCM start_busy = get_property ("busyGrobs");
-  SCM busy = start_busy;
-  while (scm_is_pair (busy) && *unsmob_moment (scm_caar (busy)) == now)
-    busy = scm_cdr (busy);
-
   vector_sort (started_now_, less<Grob_pq_entry> ());
   SCM lst = SCM_EOL;
   SCM *tail = &lst;
@@ -107,12 +102,24 @@ Grob_pq_engraver::stop_translation_timestep ()
       tail = SCM_CDRLOC (*tail);
     }
 
+  SCM busy = get_property ("busyGrobs");
   busy = scm_merge_x (lst, busy, ly_grob_pq_less_p_proc);
   context ()->set_property ("busyGrobs", busy);
 
   started_now_.clear ();
 }
 
+void
+Grob_pq_engraver::stop_translation_timestep ()
+{
+  Moment now = now_mom ();
+  SCM start_busy = get_property ("busyGrobs");
+  SCM busy = start_busy;
+  while (scm_is_pair (busy) && *unsmob_moment (scm_caar (busy)) == now)
+    busy = scm_cdr (busy);
+
+}
+
 void
 Grob_pq_engraver::start_translation_timestep ()
 {