mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 20:11:02 +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
|
(ObjValue is TComponent) then
|
||||||
begin
|
begin
|
||||||
//writeln('TWriter.WriteProperty AncestorObj=',TComponent(AncestorObj).Name,' OwnerFit=',TComponent(AncestorObj).Owner = FRootAncestor,' ',TComponent(ObjValue).Name,' OwnerFit=',TComponent(ObjValue).Owner = Root);
|
//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
|
if (AncestorObj<> ObjValue) and
|
||||||
(TComponent(ObjValue).Owner <> Root) or
|
(TComponent(AncestorObj).Owner = FRootAncestor) and
|
||||||
(UpperCase(TComponent(AncestorObj).Name) <> UpperCase(TComponent(ObjValue).Name)) then
|
(TComponent(ObjValue).Owner = Root) and
|
||||||
|
(UpperCase(TComponent(AncestorObj).Name) = UpperCase(TComponent(ObjValue).Name)) then
|
||||||
begin
|
begin
|
||||||
AncestorObj := nil;
|
// different components, but with the same name
|
||||||
|
// treat it like an override
|
||||||
|
AncestorObj := ObjValue;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end else
|
end else
|
||||||
|
Loading…
Reference in New Issue
Block a user