]> git.donarmstrong.com Git - lilypond.git/commit
Fix 153: \once\set properly restores the context property
authorReinhold Kainhofer <reinhold@kainhofer.com>
Wed, 20 Jul 2011 16:32:09 +0000 (18:32 +0200)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Thu, 28 Jul 2011 12:21:38 +0000 (14:21 +0200)
commitd1db9b1d6ebb1014429974f22162b44bf9a03533
tree2a49cdce580f61a9cbeafb0757a68f714dd1ceab
parentafe8b3f3bd801863ae18f5485470957f3999d661
Fix 153: \once\set properly restores the context property

\once\set works by installing a finalization hook in the iterator.
To restore the context property value before the \once\set, we simply
cache the old value and pass it to the finalization hook as third
argument. The finalization hook then sends a SetProperty event with
the old value rather than an UnsetProperty event, which would revert
the value to the default.
input/regression/set-once.ly [new file with mode: 0644]
lily/include/property-iterator.hh
lily/property-iterator.cc