fix, process input wdget remained disabled if process killed manually

This commit is contained in:
Basile Burg 2015-05-31 21:07:40 +02:00
parent 08207c365c
commit 5dd4001470
1 changed files with 3 additions and 4 deletions

View File

@ -77,14 +77,12 @@ end;
procedure TCEProcInputWidget.addProcess(aProcess: TProcess);
begin
Panel1.Enabled:=false;
// TODO-cfeature: process list, imply that each TCESynMemo must have its own runnable TProcess
// currently they share the CEMainForm.fRunProc variable.
if fProc <> nil then
begin
fProc.Terminate(1);
Panel1.Enabled:=false;
end
else Panel1.Enabled:=true;
txtExeName.Caption := 'no process';
fProc := nil;
@ -93,6 +91,7 @@ begin
if not (poUsePipes in aProcess.Options) then
exit;
fProc := aProcess;
if fProc <> nil then Panel1.Enabled:=true;
txtExeName.Caption := shortenPath(fProc.Executable);
end;