]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lyric-engraver.cc
Add new git file to tarball. Fixes installer build.
[lilypond.git] / lily / lyric-engraver.cc
index 136a50135866ec92cd7f44445b71fb54e0b2bed4..c52cba8356cb59f25bfb678ef3e9dc164dc8e4b0 100644 (file)
@@ -73,16 +73,27 @@ Lyric_engraver::process_music ()
       if (ly_is_equal (text, scm_from_locale_string (" ")))
        {
          if (last_text_)
-           last_text_->set_property ("self-alignment-X", scm_from_int (LEFT));
+           last_text_->set_property ("self-alignment-X",
+                                     get_property ("lyricMelismaAlignment"));
        }
       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;
@@ -92,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
     {
@@ -193,7 +204,8 @@ ADD_TRANSLATOR (Lyric_engraver,
                /* read */
                "ignoreMelismata "
                "includeGraceNotes "
-               "lyricMelismaAlignment ",
+               "lyricMelismaAlignment "
+               "searchForVoice",
 
                /* write */
                ""