]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/engraver.cc
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / lily / engraver.cc
index cf2eebbe9b5c4a65515ba6a1fd3974ea656659a3..eebd22e4bea706dbf8635b70c0e1ebf412cedb24 100644 (file)
@@ -8,14 +8,14 @@
 
 #include "engraver.hh"
 
-#include "context.hh"
-#include "item.hh"
-#include "lilypond-key.hh"
 #include "music.hh"
 #include "score-engraver.hh"
-#include "spanner.hh"
-#include "stream-event.hh"
 #include "warn.hh"
+#include "spanner.hh"
+#include "item.hh"
+#include "context.hh"
+#include "score-context.hh"
+#include "lilypond-key.hh"
 
 Engraver_group *
 Engraver::get_daddy_engraver () const
@@ -36,18 +36,13 @@ Engraver::announce_end_grob (Grob_info inf)
 }
 
 /*
-  CAUSE is the object (typically a Stream_event object)  that
+  CAUSE is the object (typically a Music object)  that
   was the reason for making E.
 */
 void
 Engraver::announce_grob (Grob *e, SCM cause)
 {
-  /* TODO: Remove Music code when it's no longer needed */
-  if (Music *m = unsmob_music (cause))
-    {
-      cause = m->to_event ()->unprotect ();
-    }
-  if (unsmob_stream_event (cause) || unsmob_grob (cause))
+  if (unsmob_music (cause) || unsmob_grob (cause))
     e->set_property ("cause", cause);
 
   Grob_info i (this, e);
@@ -65,12 +60,7 @@ Engraver::announce_grob (Grob *e, SCM cause)
 void
 Engraver::announce_end_grob (Grob *e, SCM cause)
 {
-  /* TODO: Remove Music code when it's no longer needed */
-  if (Music *m = unsmob_music (cause))
-    {
-      cause = m->to_event ()->unprotect ();
-    }
-  if (unsmob_stream_event (cause) || unsmob_grob (cause))
+  if (unsmob_music (cause) || unsmob_grob (cause))
     e->set_property ("cause", cause);
 
   Grob_info i (this, e);