mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-03 04:58:22 +02:00
IDE: fixed mem leak
git-svn-id: trunk@30067 -
This commit is contained in:
parent
35c579cb7c
commit
333a3192c5
@ -689,6 +689,7 @@ begin
|
||||
TVNodeStack:=TFPList.Create;
|
||||
ExpandedState:=TTreeNodeExpandedState.Create(ItemsTreeView);
|
||||
try
|
||||
FreeTVNodeData(FFilesNode);
|
||||
if LazProject<>nil then begin
|
||||
// collect and sort files
|
||||
CurFile:=LazProject.FirstPartOfProject;
|
||||
@ -708,7 +709,6 @@ begin
|
||||
//debugln(['TProjectInspectorForm.UpdateFiles filtered=',Files.Count,' of ',LazProject.FileCount,' Filter="',Filter,'" Hierachy=',ShowDirectoryHierarchy,' SortAlpha=',SortAlphabetically]);
|
||||
|
||||
// update treeview nodes
|
||||
FreeTVNodeData(FFilesNode);
|
||||
if Files.Count=0 then
|
||||
FFilesNode.DeleteChildren
|
||||
else begin
|
||||
@ -981,15 +981,12 @@ begin
|
||||
ANode:=ItemsTreeView.Items.GetFirstNode
|
||||
else
|
||||
ANode:=ANode.GetFirstChild;
|
||||
while (ANode<>nil) and (ANode.Text<>CurText) do
|
||||
ANode:=ANode.GetNextSibling;
|
||||
while ANode.Text<>CurText do ANode:=ANode.GetNextSibling;
|
||||
if ANode=nil then break;
|
||||
ASelection.Delete(0);
|
||||
end;
|
||||
if ANode<>nil then
|
||||
ItemsTreeView.Selected:=ANode;
|
||||
if FreeList then
|
||||
ASelection.Free;
|
||||
if ANode<>nil then ItemsTreeView.Selected:=ANode;
|
||||
if FreeList then ASelection.Free;
|
||||
end;
|
||||
|
||||
constructor TProjectInspectorForm.Create(TheOwner: TComponent);
|
||||
|
Loading…
Reference in New Issue
Block a user