mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 10:40:13 +02:00
* Patch from martin friebe (bug id 14380) to fix streaming of frames
git-svn-id: trunk@13567 -
This commit is contained in:
parent
df1c366428
commit
a7ed599879
@ -879,6 +879,7 @@ begin
|
||||
{ Check if the ancestor can be used }
|
||||
HasAncestor := Assigned(Ancestor) and ((Instance = Root) or
|
||||
(Instance.ClassType = Ancestor.ClassType));
|
||||
//writeln('TWriter.WriteProperty Name=',PropType^.Name,' Kind=',GetEnumName(TypeInfo(TTypeKind),ord(PropType^.Kind)),' HasAncestor=',HasAncestor);
|
||||
|
||||
case PropType^.Kind of
|
||||
tkInteger, tkChar, tkEnumeration, tkSet, tkWChar:
|
||||
@ -1035,14 +1036,17 @@ begin
|
||||
if HasAncestor then
|
||||
begin
|
||||
AncestorObj := TObject(GetObjectProp(Ancestor, PropInfo));
|
||||
if Assigned(AncestorObj) then
|
||||
if Assigned(ObjValue) and
|
||||
(TComponent(AncestorObj).Owner = FRootAncestor) and
|
||||
(TComponent(ObjValue).Owner = Root) and
|
||||
(UpperCase(TComponent(AncestorObj).Name) = UpperCase(TComponent(ObjValue).Name)) then
|
||||
AncestorObj := ObjValue
|
||||
// else
|
||||
// AncestorObj := nil;
|
||||
if (AncestorObj is TComponent) and
|
||||
(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
|
||||
begin
|
||||
AncestorObj := nil;
|
||||
end;
|
||||
end;
|
||||
end else
|
||||
AncestorObj := nil;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user