]> git.donarmstrong.com Git - lilypond.git/commitdiff
(find_voice): issue
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 6 Jun 2004 21:18:21 +0000 (21:18 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 6 Jun 2004 21:18:21 +0000 (21:18 +0000)
warning only once.

ChangeLog
lily/new-lyric-combine-music-iterator.cc

index dcc27bbb9ea9465f3f4e077ba30fc2ef11dca996..4c12f7c9f9f68602b694a448044950820be46993 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-06-06  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/new-lyric-combine-music-iterator.cc (find_voice): issue
+       warning only once.
+
        * lily/accidental-engraver.cc (number_accidentals_from_sig):
        bugfix, 2nd try.
 
index 8613ee2c10e5643a451d84e8eaf8823206607126..e8f225c5f6a16634cb0c63cf13196d15c41ed896 100644 (file)
@@ -34,6 +34,7 @@ private:
   bool start_new_syllable () ;
   void find_voice ();
 
+  bool warned_;
   bool made_association_;
   Context * lyrics_context_;
   Context * music_context_;
@@ -49,6 +50,7 @@ static Music *melisma_playing_ev;
 
 New_lyric_combine_music_iterator::New_lyric_combine_music_iterator ()
 {
+  warned_ = false;
   made_association_ = false;
   lyric_iter_ =0;
   music_context_ =0;
@@ -168,9 +170,12 @@ New_lyric_combine_music_iterator::find_voice ()
 
          String name = ly_scm2string (voice_name);
          Context *voice = find_context_below (t, ly_symbol2scm ("Voice"), name);
-         if (!voice)
-           get_music ()->origin ()->warning (_f ("cannot find Voice: %s",
-                                                 name.to_str0 ()) + "\n");
+         if (!voice && !warned_)
+           {
+             warned_ = true;
+             get_music ()->origin ()->warning (_f ("cannot find Voice: %s",
+                                                   name.to_str0 ()) + "\n");
+           }
          else
            music_context_ = voice;