mirror of https://gitlab.com/basile.b/dexed.git
fix double message when tool terminated
This commit is contained in:
parent
de824376ff
commit
b76cc3ce0e
|
@ -18,6 +18,7 @@ type
|
||||||
TToolItem = class(TCollectionItem)
|
TToolItem = class(TCollectionItem)
|
||||||
private
|
private
|
||||||
fToolItems: TToolItems;
|
fToolItems: TToolItems;
|
||||||
|
fTerminatedFlag: boolean;
|
||||||
fNextToolAlias: string;
|
fNextToolAlias: string;
|
||||||
fProcess: TDexedProcess;
|
fProcess: TDexedProcess;
|
||||||
fExecutable: TFilename;
|
fExecutable: TFilename;
|
||||||
|
@ -190,6 +191,7 @@ const
|
||||||
confSpec = 'Are you sure you want to execute the "%s" tool ?';
|
confSpec = 'Are you sure you want to execute the "%s" tool ?';
|
||||||
begin
|
begin
|
||||||
u_processes.killProcess(fProcess);
|
u_processes.killProcess(fProcess);
|
||||||
|
fTerminatedFlag := false;
|
||||||
|
|
||||||
if fMsgs = nil then
|
if fMsgs = nil then
|
||||||
fMsgs := getMessageDisplay;
|
fMsgs := getMessageDisplay;
|
||||||
|
@ -263,6 +265,9 @@ begin
|
||||||
end;
|
end;
|
||||||
if (not fProcess.Running) then
|
if (not fProcess.Running) then
|
||||||
begin
|
begin
|
||||||
|
if fTerminatedFlag then
|
||||||
|
exit;
|
||||||
|
fTerminatedFlag := true;
|
||||||
if fProcess.ExitStatus <> 0 then
|
if fProcess.ExitStatus <> 0 then
|
||||||
begin
|
begin
|
||||||
fMsgs.message(format('error: the tool (%s) has returned the status %s',
|
fMsgs.message(format('error: the tool (%s) has returned the status %s',
|
||||||
|
|
Loading…
Reference in New Issue