From 353009e1d4a7feeca149b05ca9274bbff0e2618c Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 6 Jun 2004 21:18:21 +0000 Subject: [PATCH] (find_voice): issue warning only once. --- ChangeLog | 3 +++ lily/new-lyric-combine-music-iterator.cc | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index dcc27bbb9e..4c12f7c9f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-06-06 Han-Wen Nienhuys + * lily/new-lyric-combine-music-iterator.cc (find_voice): issue + warning only once. + * lily/accidental-engraver.cc (number_accidentals_from_sig): bugfix, 2nd try. diff --git a/lily/new-lyric-combine-music-iterator.cc b/lily/new-lyric-combine-music-iterator.cc index 8613ee2c10..e8f225c5f6 100644 --- a/lily/new-lyric-combine-music-iterator.cc +++ b/lily/new-lyric-combine-music-iterator.cc @@ -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; -- 2.39.5