X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fproperty-iterator.cc;h=bb1d3b4c1853748a1bbc02df4c573865fc71228d;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=c7cb8108b0b214f8e2c5e1f4209c430c0f37f472;hpb=e8b68d8a878a0ee0381719230cf911dbcefa168d;p=lilypond.git diff --git a/lily/property-iterator.cc b/lily/property-iterator.cc index c7cb8108b0..bb1d3b4c18 100644 --- a/lily/property-iterator.cc +++ b/lily/property-iterator.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1997--2014 Han-Wen Nienhuys + Copyright (C) 1997--2015 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -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);