]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/lyric-combine-music-iterator.cc (find_voice): return 0 if
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 3 Jun 2006 12:25:27 +0000 (12:25 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 3 Jun 2006 12:25:27 +0000 (12:25 +0000)
nothing changes. (Erik S)

* lily/percent-repeat-iterator.cc (get_music_list): fix repeat
count. (Erik S)

ChangeLog
lily/lyric-combine-music-iterator.cc
lily/percent-repeat-iterator.cc

index 4d3b96d5ab4a8f3953dc7b98a421ac80f5666d16..334fe29a84ac9331088add3264545bcd3ca0ae8d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-06-03  Han-Wen Nienhuys  <hanwen@lilypond.org>
+
+       * lily/lyric-combine-music-iterator.cc (find_voice): return 0 if
+       nothing changes. (Erik S) 
+
+       * lily/percent-repeat-iterator.cc (get_music_list): fix repeat
+       count. (Erik S)
+
 2006-05-28  Nicolas Sceaux  <nicolas.sceaux@free.fr>
 
        * scm/define-markup-commands.scm (whiteout): do not force
index 14d3959cee5ceaae5b0b461cb5d9a14f48653865..8501d3f5b26e1d3f622b60f76d825cc5ed9accf2 100644 (file)
@@ -202,7 +202,11 @@ Lyric_combine_music_iterator::check_new_context (SCM sev)
 }
 
 /*
-Look for a suitable voice to align lyrics to.
+  Look for a suitable voice to align lyrics to.
+
+  Returns 0 if nothing should change; i.e., if we already listen to the
+  right voice, or if we don't yet listen to a voice but no appropriate
+  voice could be found.
 */
 Context *
 Lyric_combine_music_iterator::find_voice ()
@@ -232,7 +236,11 @@ Lyric_combine_music_iterator::find_voice ()
 void
 Lyric_combine_music_iterator::process (Moment)
 {
-  find_voice ();
+  /* see if associatedVoice has been changed */
+  Context *new_voice = find_voice ();
+  if (new_voice)
+    set_music_context (new_voice);
+
   if (!music_context_)
     return;
 
index 7ba527da5d9aef489d8986046ca658c90810afc9..27481cf1ab1b3335fc469989f7723a4d1a0a2be9 100644 (file)
@@ -34,7 +34,7 @@ Percent_repeat_iterator::get_music_list () const
     percent->set_spot (*mus->origin ());
     percent->set_property ("length", length);
     if (repeats > 1)
-      percent->set_property ("repeat-count", scm_int2num (i - 1));
+      percent->set_property ("repeat-count", scm_int2num (i));
     child_list = scm_cons (percent->unprotect (), child_list);
   }
   child_list = scm_cons (child->self_scm (), child_list);