mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 21:09:24 +02:00
* Patch from Mattias Gaertner to fix property overrides. (bug ID 14885)
git-svn-id: trunk@13939 -
This commit is contained in:
parent
ea00759588
commit
89ec956733
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user