mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 17:09:16 +02:00
* Applied patch from Bug ID #25048, fixing write of TPersistent (TCollection)
git-svn-id: trunk@26720 -
This commit is contained in:
parent
f59a2272d9
commit
ddda356ee8
@ -1110,7 +1110,20 @@ begin
|
||||
end; // length Name>0
|
||||
end; //(ObjValue <> AncestorObj)
|
||||
end // ObjValue.InheritsFrom(TComponent)
|
||||
else if ObjValue.InheritsFrom(TCollection) then
|
||||
else
|
||||
begin
|
||||
SavedAncestor := Ancestor;
|
||||
SavedPropPath := FPropPath;
|
||||
try
|
||||
FPropPath := FPropPath + PPropInfo(PropInfo)^.Name + '.';
|
||||
if HasAncestor then
|
||||
Ancestor := TPersistent(GetObjectProp(Ancestor, PropInfo));
|
||||
WriteProperties(TPersistent(ObjValue));
|
||||
finally
|
||||
Ancestor := SavedAncestor;
|
||||
FPropPath := SavedPropPath;
|
||||
end;
|
||||
if ObjValue.InheritsFrom(TCollection) then
|
||||
begin
|
||||
if (not HasAncestor) or (not CollectionsEqual(TCollection(ObjValue),
|
||||
TCollection(GetObjectProp(Ancestor, PropInfo)),root,rootancestor)) then
|
||||
@ -1126,19 +1139,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
end // Tcollection
|
||||
else
|
||||
begin
|
||||
SavedAncestor := Ancestor;
|
||||
SavedPropPath := FPropPath;
|
||||
try
|
||||
FPropPath := FPropPath + PPropInfo(PropInfo)^.Name + '.';
|
||||
if HasAncestor then
|
||||
Ancestor := TPersistent(GetObjectProp(Ancestor, PropInfo));
|
||||
WriteProperties(TPersistent(ObjValue));
|
||||
finally
|
||||
Ancestor := SavedAncestor;
|
||||
FPropPath := SavedPropPath;
|
||||
end;
|
||||
end;
|
||||
end; // Inheritsfrom(TPersistent)
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user