]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix #532.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 24 Feb 2008 00:07:14 +0000 (21:07 -0300)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 24 Feb 2008 00:07:14 +0000 (21:07 -0300)
In case that the lyrics name is "", don't go looking for an associated
voice.

input/regression/lyric-no-association-rhythm.ly [new file with mode: 0644]
lily/lyric-engraver.cc

diff --git a/input/regression/lyric-no-association-rhythm.ly b/input/regression/lyric-no-association-rhythm.ly
new file mode 100644 (file)
index 0000000..782d486
--- /dev/null
@@ -0,0 +1,26 @@
+
+\header {
+
+  texidoc = "When lyrics are not associated with specific voices, the
+  lyric placement should follow lyric rhythms.  In particular, the
+  second syllable here should not be attached to the first note of the first staff."
+
+}
+
+
+\version "2.11.40"
+\layout { ragged-right = ##t }
+
+\score {
+  \context ChoirStaff <<
+    \context Staff = soprano <<
+      \context Voice = sop \relative c' { e2 e4  }
+    >>
+    \context Staff = alto <<
+      \context Voice = alt \relative c' { e4  e4  e4  }
+      \new Lyrics \lyricmode { 
+        do4 re4 me4
+      }
+    >>
+  >>
+}
index 88b954f4fac2b299b0e94f4936300c299f057681..ce138390890eac3900854c84b0891f4fd98ce0a4 100644 (file)
@@ -83,6 +83,10 @@ get_voice_to_lyrics (Context *lyrics)
 
   if (scm_is_string (voice_name))
     nm = ly_scm2string (voice_name);
+  else if (nm == "")
+    {
+      return 0;
+    }
   else
     {
       ssize idx = nm.rfind ('-');
@@ -142,7 +146,7 @@ Lyric_engraver::stop_translation_timestep ()
   if (text_)
     {
       Context *voice = get_voice_to_lyrics (context ());
-
       if (voice)
        {
          Grob *head = get_current_note_head (voice);