]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lyric-engraver.cc
Adapt fixcc.py to use Astyle
[lilypond.git] / lily / lyric-engraver.cc
index ffae2783ba2d409ea3b6ccf445ef6a3476feff72..c52cba8356cb59f25bfb678ef3e9dc164dc8e4b0 100644 (file)
@@ -79,11 +79,21 @@ Lyric_engraver::process_music ()
       else
        text_ = make_item ("LyricText", event_->self_scm ());
     }
+
+    Context *voice = get_voice_to_lyrics (context ());
+    if (last_text_
+        && voice
+        && to_boolean (voice->get_property ("melismaBusy"))
+        && !to_boolean (context ()->get_property ("ignoreMelismata")))
+      last_text_->set_property ("self-alignment-X",
+                               get_property ("lyricMelismaAlignment"));
 }
 
 Context *
 get_voice_to_lyrics (Context *lyrics)
 {
+  bool searchForVoice = to_boolean (lyrics->get_property ("searchForVoice"));
+
   SCM avc = lyrics->get_property ("associatedVoiceContext");
   if (Context *c = unsmob_context (avc))
     return c;
@@ -93,7 +103,7 @@ get_voice_to_lyrics (Context *lyrics)
 
   if (scm_is_string (voice_name))
     nm = ly_scm2string (voice_name);
-  else if (nm == "")
+  else if (nm == "" || !searchForVoice)
     return 0;
   else
     {
@@ -194,7 +204,8 @@ ADD_TRANSLATOR (Lyric_engraver,
                /* read */
                "ignoreMelismata "
                "includeGraceNotes "
-               "lyricMelismaAlignment ",
+               "lyricMelismaAlignment "
+               "searchForVoice",
 
                /* write */
                ""