Browse Source

* patch from Mattias fixing save/restore ancestorpos in twriter. Mantis #32607

git-svn-id: trunk@37513 -
marco 7 years ago
parent
commit
fb57fd7324
1 changed files with 3 additions and 3 deletions
  1. 3 3
      rtl/objpas/classes/writer.inc

+ 3 - 3
rtl/objpas/classes/writer.inc

@@ -697,8 +697,7 @@ procedure TWriter.WriteChildren(Component : TComponent);
 Var
   SRoot, SRootA : TComponent;
   SList : TStringList;
-  SPos : Integer;
-  I : Integer;
+  SPos, I , SAncestorPos: Integer;
   
 begin
   // Write children list. 
@@ -708,6 +707,7 @@ begin
   SRootA:=FRootAncestor;
   SList:=FAncestors;
   SPos:=FCurrentPos;
+  SAncestorPos:=FAncestorPos;
   try
     FAncestors:=Nil;
     FCurrentPos:=0;
@@ -735,7 +735,7 @@ begin
     FRoot:=SRoot;
     FRootAncestor:=SRootA;
     FCurrentPos:=SPos;
-    FAncestorPos:=Spos;
+    FAncestorPos:=SAncestorPos;
   end;
 end;