mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-15 10:19:23 +02:00
IDE: initial setup: fixed crashing on stop button
git-svn-id: trunk@39512 -
This commit is contained in:
parent
3ee69cda42
commit
bbb1096a18
@ -207,7 +207,7 @@ type
|
|||||||
MinQuality: TSDFilenameQuality = sddqCompatible): TSDFileInfo;
|
MinQuality: TSDFilenameQuality = sddqCompatible): TSDFileInfo;
|
||||||
function QualityToImgIndex(Quality: TSDFilenameQuality): integer;
|
function QualityToImgIndex(Quality: TSDFilenameQuality): integer;
|
||||||
procedure ShowHideScanControls(aShow: Boolean);
|
procedure ShowHideScanControls(aShow: Boolean);
|
||||||
procedure ThreadTerminated(Sender: TObject);
|
procedure ThreadTerminated(Sender: TObject); // called in main thread by fSearchFpcSourceThread.OnTerminate
|
||||||
public
|
public
|
||||||
TVNodeLazarus: TTreeNode;
|
TVNodeLazarus: TTreeNode;
|
||||||
TVNodeCompiler: TTreeNode;
|
TVNodeCompiler: TTreeNode;
|
||||||
@ -1600,6 +1600,7 @@ end;
|
|||||||
|
|
||||||
procedure TInitialSetupDialog.StopScanButtonClick(Sender: TObject);
|
procedure TInitialSetupDialog.StopScanButtonClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
if fSearchFpcSourceThread<>nil then
|
||||||
fSearchFpcSourceThread.Terminate;
|
fSearchFpcSourceThread.Terminate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2082,7 +2083,7 @@ begin
|
|||||||
Candidate:=GetFirstCandidate(FCandidates[sddtFPCSrcDir]);
|
Candidate:=GetFirstCandidate(FCandidates[sddtFPCSrcDir]);
|
||||||
if Candidate<>nil then begin
|
if Candidate<>nil then begin
|
||||||
EnvironmentOptions.FPCSourceDirectory:=Candidate.Caption;
|
EnvironmentOptions.FPCSourceDirectory:=Candidate.Caption;
|
||||||
ThreadTerminated(Nil); // Hide controls dealing with scanning
|
ShowHideScanControls(false); // Hide controls dealing with scanning
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
// No candidates found => start a thread to scan the file system.
|
// No candidates found => start a thread to scan the file system.
|
||||||
|
Loading…
Reference in New Issue
Block a user