mirror of https://gitlab.com/basile.b/dexed.git
fix leak when selecting a fav
This commit is contained in:
parent
44cadb4fd3
commit
2884ec32bf
|
@ -172,12 +172,13 @@ begin
|
||||||
if not Selected then exit;
|
if not Selected then exit;
|
||||||
//
|
//
|
||||||
fLastFold := PString(Item.Data)^;
|
fLastFold := PString(Item.Data)^;
|
||||||
lstFiles.Clear;
|
|
||||||
lst := TStringList.Create;
|
lst := TStringList.Create;
|
||||||
try
|
try
|
||||||
|
lstFiles.Items.Clear;
|
||||||
listFiles(lst, fLastFold);
|
listFiles(lst, fLastFold);
|
||||||
fillLstFiles(lst);
|
fillLstFiles(lst);
|
||||||
finally
|
finally
|
||||||
|
lst.Free;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -191,11 +192,6 @@ begin
|
||||||
lstFiles.Clear;
|
lstFiles.Clear;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEMiniExplorerWidget.lstFilesDblClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
shellOpenSelected;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TCEMiniExplorerWidget.btnAddFavClick(Sender: TObject);
|
procedure TCEMiniExplorerWidget.btnAddFavClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if Tree.Selected = nil then exit;
|
if Tree.Selected = nil then exit;
|
||||||
|
@ -205,9 +201,9 @@ end;
|
||||||
procedure TCEMiniExplorerWidget.lstFavDblClick(Sender: TObject);
|
procedure TCEMiniExplorerWidget.lstFavDblClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if lstFav.Selected = nil then exit;
|
if lstFav.Selected = nil then exit;
|
||||||
|
lstFiles.Items.Clear;
|
||||||
expandPath(lstFav.Selected.Caption);
|
expandPath(lstFav.Selected.Caption);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
|
||||||
{$REGION Files -----------------------------------------------------------------}
|
{$REGION Files -----------------------------------------------------------------}
|
||||||
|
@ -244,6 +240,11 @@ begin
|
||||||
CEMainForm.openFile(fname);
|
CEMainForm.openFile(fname);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCEMiniExplorerWidget.lstFilesDblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
shellOpenSelected;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCEMiniExplorerWidget.shellOpenSelected;
|
procedure TCEMiniExplorerWidget.shellOpenSelected;
|
||||||
var
|
var
|
||||||
fname: string;
|
fname: string;
|
||||||
|
@ -355,7 +356,6 @@ begin
|
||||||
treeScanSubFolders(Tree.Selected);
|
treeScanSubFolders(Tree.Selected);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//TODO-cbugfix: it leaks expanded nodes data.
|
|
||||||
procedure TCEMiniExplorerWidget.expandPath(const aPath: string);
|
procedure TCEMiniExplorerWidget.expandPath(const aPath: string);
|
||||||
var
|
var
|
||||||
i: NativeInt;
|
i: NativeInt;
|
||||||
|
|
Loading…
Reference in New Issue