MG: fixed finding class parts with empty sections

git-svn-id: trunk@1495 -
This commit is contained in:
lazarus 2002-03-09 17:13:25 +00:00
parent 7be6c70b19
commit 2c995dc597
2 changed files with 9 additions and 6 deletions

View File

@ -526,12 +526,15 @@ begin
end; end;
end; end;
// next node // next node
if (ANode.NextBrother=nil) and (ANode.Parent<>nil) if ANode.NextBrother<>nil then begin
and (ANode.Parent.NextBrother<>nil)
and (ANode.Parent.Desc in (AllCodeSections+AllClassSections)) then
ANode:=ANode.Parent.NextBrother.FirstChild
else
ANode:=ANode.NextBrother; ANode:=ANode.NextBrother;
end else begin
ANode:=ANode.Parent.NextBrother;
while (ANode<>nil) and (ANode.Desc in (AllCodeSections+AllClassSections))
and (ANode.FirstChild=nil) do
ANode:=ANode.NextBrother;
if ANode<>nil then ANode:=ANode.FirstChild;
end;
end; end;
end; end;