X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fcontext-specced-music-iterator.cc;h=b639e3b7e44bd0eb87ed5ede63ce19e418789869;hb=7e79448be56dad04b97e89e0c49dce64bf16100e;hp=f5d678115670df50a5f3bef1d1c7b28497c958c9;hpb=94a1966c72301b8bd1d8bb3b8628c3f089d007cf;p=lilypond.git diff --git a/lily/context-specced-music-iterator.cc b/lily/context-specced-music-iterator.cc index f5d6781156..b639e3b7e4 100644 --- a/lily/context-specced-music-iterator.cc +++ b/lily/context-specced-music-iterator.cc @@ -1,11 +1,10 @@ -/* +/* context-specced-music-iterator.cc -- implement - Context_specced_music_iterator + Context_specced_music_iterator source file of the GNU LilyPond music typesetter - (c) 2002--2004 Han-Wen Nienhuys - + (c) 2002--2005 Han-Wen Nienhuys */ #include "music-wrapper-iterator.hh" @@ -14,7 +13,7 @@ class Context_specced_music_iterator : public Music_wrapper_iterator { public: - DECLARE_SCHEME_CALLBACK (constructor,()); + DECLARE_SCHEME_CALLBACK (constructor, ()); virtual void construct_children (); }; @@ -25,20 +24,24 @@ Context_specced_music_iterator::construct_children () String c_id; SCM ci = get_music ()->get_property ("context-id"); - if (ly_string_p (ci)) + if (scm_is_string (ci)) c_id = ly_scm2string (ci); SCM ops = get_music ()->get_property ("property-operations"); - - Context * a - = get_outlet ()->find_create_context (ct, c_id, ops); + + Context *a = 0; + + if (c_id == "$uniqueContextId") + a = get_outlet ()->create_unique_context (ct, ops); + else + 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); + set_context (a); Music_wrapper_iterator::construct_children (); }