* Fixed writing of default boolean values

git-svn-id: trunk@11749 -
This commit is contained in:
michael 2008-09-11 19:37:18 +00:00
parent d77b2b2c0c
commit c94843c646

View File

@ -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);