]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/quote-iterator.cc
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / lily / quote-iterator.cc
index fd7498d7bef44d9ac7b409b918e790536ac26f8e..9ca8fd25b7ed4dacf22b551e35bf838350894f91 100644 (file)
@@ -3,16 +3,18 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2004--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 2004--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
+#include "music-wrapper-iterator.hh"
+
 #include "context.hh"
-#include "music.hh"
-#include "music-sequence.hh"
+#include "input.hh"
+#include "international.hh"
 #include "lily-guile.hh"
-#include "music-wrapper-iterator.hh"
+#include "music-sequence.hh"
+#include "music.hh"
 #include "warn.hh"
-#include "input.hh"
 
 class Quote_iterator : public Music_wrapper_iterator
 {
@@ -26,7 +28,7 @@ public:
   SCM event_vector_;
   int event_idx_;
   int end_idx_;
-
+  
   SCM transposed_musics_;
 
   DECLARE_SCHEME_CALLBACK (constructor, ());
@@ -105,7 +107,7 @@ void
 Quote_iterator::construct_children ()
 {
   Music_wrapper_iterator::construct_children ();
-
+      
   SCM name = get_music ()->get_property ("quoted-context-type");
   SCM id = get_music ()->get_property ("quoted-context-id");
 
@@ -117,9 +119,7 @@ Quote_iterator::construct_children ()
       quote_outlet_.set_context (cue_context);
     }
   else
-    {
-      quote_outlet_.set_context (get_outlet ());
-    }
+    quote_outlet_.set_context (get_outlet ());
 
   event_vector_ = get_music ()->get_property ("quoted-events");
 
@@ -222,7 +222,9 @@ Quote_iterator::process (Moment m)
       /*
        The pitch that sounds like central C
       */
-      Pitch *me_pitch = unsmob_pitch (get_outlet ()->get_property ("instrumentTransposition"));
+      Pitch *me_pitch = unsmob_pitch (get_music ()->get_property ("quoted-transposition"));
+      if (!me_pitch)
+       me_pitch = unsmob_pitch (get_outlet ()->get_property ("instrumentTransposition"));
 
       for (SCM s = scm_cdr (entry); scm_is_pair (s); s = scm_cdr (s))
        {
@@ -250,10 +252,7 @@ Quote_iterator::process (Moment m)
                  mus->transpose (diff);
                }
 
-             bool b = quote_outlet_.get_outlet ()->try_music (mus);
-             if (!b)
-               mus->origin ()->warning (_f ("in quotation: junking event %s",
-                                            mus->name ()));
+             quote_outlet_.get_outlet ()->try_music (mus);
            }
        }