From c94843c64627a8fe2cd104dff0cb8da80b16fafe Mon Sep 17 00:00:00 2001 From: michael Date: Thu, 11 Sep 2008 19:37:18 +0000 Subject: [PATCH] * Fixed writing of default boolean values git-svn-id: trunk@11749 - --- rtl/objpas/classes/writer.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rtl/objpas/classes/writer.inc b/rtl/objpas/classes/writer.inc index 144fae77fd..3971a780f5 100644 --- a/rtl/objpas/classes/writer.inc +++ b/rtl/objpas/classes/writer.inc @@ -798,7 +798,7 @@ begin DefValue := GetOrdProp(Ancestor, PropInfo) else DefValue := PPropInfo(PropInfo)^.Default; - //writeln(PPropInfo(PropInfo)^.Name, ', HasAncestor=', ord(HasAncestor), ', Value=', Value, ', Default=', DefValue); + // writeln(PPropInfo(PropInfo)^.Name, ', HasAncestor=', ord(HasAncestor), ', Value=', Value, ', Default=', DefValue); if (Value <> DefValue) or (DefValue=longint($80000000)) then begin Driver.BeginProperty(FPropPath + PPropInfo(PropInfo)^.Name); @@ -1030,8 +1030,12 @@ begin if HasAncestor then DefBoolValue := GetOrdProp(Ancestor, PropInfo)<>0 else + begin DefBoolValue := PPropInfo(PropInfo)^.Default<>0; - if BoolValue <> DefBoolValue then + DefValue:=PPropInfo(PropInfo)^.Default; + end; + // writeln(PPropInfo(PropInfo)^.Name, ', HasAncestor=', ord(HasAncestor), ', Value=', Value, ', Default=', DefBoolValue); + if (BoolValue<>DefBoolValue) or (DefValue=longint($80000000)) then begin Driver.BeginProperty(FPropPath + PPropInfo(PropInfo)^.Name); WriteBoolean(BoolValue);