From 73d8c2b35d692409b1c59dbd5edee82e21018b99 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 12 Sep 2007 01:32:58 +0200 Subject: [PATCH] Fix #457. Don't replace the head of the alist when executing an \override. The head may contain the value (set in the same context) to \revert to. --- lily/context-property.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lily/context-property.cc b/lily/context-property.cc index e025979291..5234d1113f 100644 --- a/lily/context-property.cc +++ b/lily/context-property.cc @@ -82,7 +82,6 @@ execute_override_property (Context *context, } SCM target_alist = scm_car (current_context_val); - SCM parent_alist = scm_cdr (current_context_val); SCM symbol = scm_car (grob_property_path); if (scm_is_pair (scm_cdr (grob_property_path))) @@ -93,11 +92,10 @@ execute_override_property (Context *context, new_value); } - if (scm_is_pair (target_alist) - && scm_caar (target_alist) == symbol - && target_alist != parent_alist) - target_alist = scm_cdr (target_alist); - + // it's tempting to replace the head of the list if it's the same + // property. However, we have to keep this info around, in case we have to + // \revert back to it. + target_alist = scm_acons (symbol, new_value, target_alist); bool ok = true; -- 2.39.5