]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/context-specced-music-iterator.cc
* scm/music-functions.scm (descend-to-context): new
[lilypond.git] / lily / context-specced-music-iterator.cc
index dc4992e36c94517bead13de2e0761b7a0521ed1a..2f7445fd6760fa34bf96b8f65f93df2eab471d30 100644 (file)
@@ -32,9 +32,15 @@ Context_specced_music_iterator::construct_children ()
   Context * a
     = get_outlet ()->find_create_context (ct, c_id, ops);
 
+  if (a
+      && to_boolean (get_music ()->get_property ("descend-only"))
+      && !is_child_context (get_outlet (), a))
+    a = 0;
+  
   if (a)
     set_translator (a);
 
   Music_wrapper_iterator::construct_children ();
 }
+
 IMPLEMENT_CTOR_CALLBACK (Context_specced_music_iterator);