浏览代码

* Patch from Martin Schreiber to fix inline component streaming

git-svn-id: trunk@10601 -
michael 17 年之前
父节点
当前提交
51f5fd5eb7
共有 1 个文件被更改,包括 7 次插入4 次删除
  1. 7 4
      rtl/objpas/classes/writer.inc

+ 7 - 4
rtl/objpas/classes/writer.inc

@@ -595,10 +595,13 @@ var Dummy: Integer;
 begin
   Dummy:=0;
   Flags := [];
-  If Assigned(FAncestor) then
-    Flags:=[ffInherited];
-  if csInline in Instance.ComponentState then
-    Flags:=Flags+[ffInline];
+  If (Assigned(FAncestor)) and  //has ancestor
+     (not (csInline in Instance.ComponentState) or // no inline component
+      // .. or the inline component is inherited
+      (csAncestor in Instance.Componentstate) and (FAncestors <> nil)) then
+    Flags:=[ffInherited]
+  else If csInline in Instance.ComponentState then
+    Flags:=[ffInline];
   FDriver.BeginComponent(Instance,Flags, Dummy);
   WriteProperties(Instance);
   WriteListEnd;