diff --git a/doceditor/pgeditor.pp b/doceditor/pgeditor.pp index 636a7d7aa0..68cb600d37 100644 --- a/doceditor/pgeditor.pp +++ b/doceditor/pgeditor.pp @@ -313,7 +313,7 @@ Var begin N:=FDocument.DocumentElement.FirstChild; - While (N<>Nil) and IsPackageNode(N) do + While (N<>Nil) and Not IsPackageNode(N) do N:=N.NextSibling; Result:=TDomElement(N); end; diff --git a/doceditor/pkeditor.pp b/doceditor/pkeditor.pp index 37b9e72d7b..d424b64f9b 100644 --- a/doceditor/pkeditor.pp +++ b/doceditor/pkeditor.pp @@ -420,7 +420,7 @@ end; Procedure TPackageEditor.SelectModule(Sender : TDomElement); begin Inherited CurrentTopic:=Nil; - Inherited CurrentPackage:=FCurrentModule.ParentNode as TDomElement; + Inherited CurrentPackage:=Sender.ParentNode as TDomElement; Inherited CurrentModule:=Sender; Inherited CurrentElement:=Sender; ShowModuleElements(FCurrentModule);