X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fproperty-iterator.cc;h=24f6383a7ad6e1964a86adc48d5daad1b8417a5f;hb=86922b24296cdb5c122f731d70c9e186b7f6b9bf;hp=076bda4f00477df838e13ff8dc656e08ce936d11;hpb=c39d188d28fdc84cef8cbaea7b8d6e2fb718c30f;p=lilypond.git diff --git a/lily/property-iterator.cc b/lily/property-iterator.cc index 076bda4f00..24f6383a7a 100644 --- a/lily/property-iterator.cc +++ b/lily/property-iterator.cc @@ -38,11 +38,9 @@ Property_iterator::process (Moment mom) bool once = to_boolean (m->get_property ("once")); SCM symbol = m->get_property ("symbol"); SCM previous_value = SCM_UNDEFINED; - if (once) { - Context *w = o->where_defined (symbol, &previous_value); - if (o != w) - previous_value = SCM_UNDEFINED; - } + if (once) + o->here_defined (symbol, &previous_value); + send_stream_event (o, "SetProperty", m->origin (), ly_symbol2scm ("symbol"), symbol, ly_symbol2scm ("value"), m->get_property ("value")); @@ -68,11 +66,9 @@ Property_unset_iterator::process (Moment mom) bool once = to_boolean (m->get_property ("once")); SCM symbol = m->get_property ("symbol"); SCM previous_value = SCM_UNDEFINED; - if (once) { - Context *w = o->where_defined (symbol, &previous_value); - if (o != w) - previous_value = SCM_UNDEFINED; - } + if (once) + o->here_defined (symbol, &previous_value); + send_stream_event (o, "UnsetProperty", m->origin (), ly_symbol2scm ("symbol"), symbol); @@ -93,8 +89,8 @@ MAKE_SCHEME_CALLBACK (Property_iterator, once_finalization, 3); SCM Property_iterator::once_finalization (SCM ctx, SCM music, SCM previous_value) { - Music *m = unsmob_music (music); - Context *c = unsmob_context (ctx); + Music *m = Music::unsmob (music); + Context *c = Context::unsmob (ctx); // Do not use UnsetProperty, which sets the default, but rather // cache the value before the \once \set command and restore it now @@ -163,8 +159,8 @@ MAKE_SCHEME_CALLBACK (Push_property_iterator, once_finalization, 2); SCM Push_property_iterator::once_finalization (SCM ctx, SCM music) { - Music *mus = unsmob_music (music); - Context *c = unsmob_context (ctx); + Music *mus = Music::unsmob (music); + Context *c = Context::unsmob (ctx); SCM sym = mus->get_property ("symbol"); if (check_grob (mus, sym))