mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
FIX: Synchronize dirs' compare by content process continued to run after closing the window
FIX: Bug [0002147] Compare in Synchronize dirs may hang the whole program when clicked again in the process of comparing by content
This commit is contained in:
parent
595693d0ab
commit
8a702e4853
1 changed files with 3 additions and 12 deletions
|
|
@ -223,7 +223,6 @@ type
|
|||
FDone: Boolean;
|
||||
procedure UpdateGrid;
|
||||
procedure ReapplyFilter;
|
||||
procedure DoOnTerminate(Sender: TObject);
|
||||
protected
|
||||
procedure Execute; override;
|
||||
public
|
||||
|
|
@ -267,12 +266,6 @@ end;
|
|||
|
||||
{ TCheckContentThread }
|
||||
|
||||
procedure TCheckContentThread.DoOnTerminate(Sender: TObject);
|
||||
begin
|
||||
FOwner.CheckContentThread := nil;
|
||||
FOwner := nil;
|
||||
end;
|
||||
|
||||
procedure TCheckContentThread.UpdateGrid;
|
||||
begin
|
||||
FOwner.MainDrawGrid.Invalidate;
|
||||
|
|
@ -354,11 +347,8 @@ end;
|
|||
|
||||
constructor TCheckContentThread.Create(Owner: TfrmSyncDirsDlg);
|
||||
begin
|
||||
inherited Create(True);
|
||||
OnTerminate := @DoOnTerminate;
|
||||
FreeOnTerminate := True;
|
||||
FOwner := Owner;
|
||||
Start;
|
||||
inherited Create(False);
|
||||
end;
|
||||
|
||||
constructor TFileSyncRec.Create(AForm: TfrmSyncDirsDlg; RelPath: string);
|
||||
|
|
@ -663,6 +653,7 @@ end;
|
|||
procedure TfrmSyncDirsDlg.FormClose(Sender: TObject;
|
||||
var CloseAction: TCloseAction);
|
||||
begin
|
||||
StopCheckContentThread;
|
||||
CloseAction := caFree;
|
||||
{ settings }
|
||||
gSyncDirsSubdirs := chkSubDirs.Checked;
|
||||
|
|
@ -690,7 +681,6 @@ begin
|
|||
begin
|
||||
FCancel := True;
|
||||
CanClose := False;
|
||||
StopCheckContentThread;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
@ -1350,6 +1340,7 @@ begin
|
|||
Terminate;
|
||||
WaitFor;
|
||||
end;
|
||||
FreeAndNil(CheckContentThread);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue