]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lyric-combine-music-iterator.cc
Issue 5167/6: Changes: show \markup xxx = ... \etc assignments
[lilypond.git] / lily / lyric-combine-music-iterator.cc
index e83d4e716c238701139515fb804910a017592528..336b167f2e98cdf2d4179b687330d1913b6d21b9 100644 (file)
@@ -161,7 +161,8 @@ Lyric_combine_music_iterator::run_always () const
 bool
 Lyric_combine_music_iterator::ok () const
 {
-  return lyric_iter_ && lyric_iter_->ok ();
+  return lyric_iter_ && lyric_iter_->ok ()
+    && !(music_context_ && music_context_->is_removable ());
 }
 
 void
@@ -265,12 +266,8 @@ Lyric_combine_music_iterator::find_voice ()
       && (!music_context_ || ly_scm2string (voice_name) != music_context_->id_string ())
       && scm_is_symbol (voice_type))
     {
-      Context *t = get_outlet ();
-      while (t && t->get_parent_context ())
-        t = t->get_parent_context ();
-
-      string name = ly_scm2string (voice_name);
-      return find_context_below (t, voice_type, name);
+      return find_context_below (find_top_context (get_outlet ()),
+                                 voice_type, ly_scm2string (voice_name));
     }
 
   return 0;