* Patch from Mattias Gaertner to fix property overrides. (bug ID 14885)

git-svn-id: trunk@13939 -
This commit is contained in:
michael 2009-10-24 12:34:26 +00:00
parent ea00759588
commit 89ec956733

View File

@ -1040,11 +1040,14 @@ begin
(ObjValue is TComponent) then
begin
//writeln('TWriter.WriteProperty AncestorObj=',TComponent(AncestorObj).Name,' OwnerFit=',TComponent(AncestorObj).Owner = FRootAncestor,' ',TComponent(ObjValue).Name,' OwnerFit=',TComponent(ObjValue).Owner = Root);
if (TComponent(AncestorObj).Owner <> FRootAncestor) or
(TComponent(ObjValue).Owner <> Root) or
(UpperCase(TComponent(AncestorObj).Name) <> UpperCase(TComponent(ObjValue).Name)) then
if (AncestorObj<> ObjValue) and
(TComponent(AncestorObj).Owner = FRootAncestor) and
(TComponent(ObjValue).Owner = Root) and
(UpperCase(TComponent(AncestorObj).Name) = UpperCase(TComponent(ObjValue).Name)) then
begin
AncestorObj := nil;
// different components, but with the same name
// treat it like an override
AncestorObj := ObjValue;
end;
end;
end else