mirror of https://gitlab.com/basile.b/dexed.git
fix, prevented infinite tool execution
This commit is contained in:
parent
ebb34743b8
commit
49cc7c0828
|
|
@ -103,13 +103,23 @@ begin
|
|||
end;
|
||||
|
||||
procedure TCEToolItem.setChainBefore(aValue: TStringList);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
fChainBefore.Assign(aValue);
|
||||
i := fChainBefore.IndexOf(fToolAlias);
|
||||
if i <> -1 then
|
||||
fChainBefore.Delete(i);
|
||||
end;
|
||||
|
||||
procedure TCEToolItem.setChainAfter(aValue: TStringList);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
fChainAfter.Assign(aValue);
|
||||
i := fChainAfter.IndexOf(fToolAlias);
|
||||
if i <> -1 then
|
||||
fChainAfter.Delete(i);
|
||||
end;
|
||||
|
||||
procedure TCEToolItem.execute;
|
||||
|
|
@ -245,12 +255,14 @@ begin
|
|||
for nme in aTool.chainBefore do
|
||||
for chained in fTools do
|
||||
if TCEToolItem(chained).toolAlias = nme then
|
||||
if TCEToolItem(chained).toolAlias <> aTool.toolAlias then
|
||||
TCEToolItem(chained).execute;
|
||||
if exeInSysPath(aTool.executable) then
|
||||
aTool.execute;
|
||||
for nme in aTool.chainAfter do
|
||||
for chained in fTools do
|
||||
if TCEToolItem(chained).toolAlias = nme then
|
||||
if TCEToolItem(chained).toolAlias <> aTool.toolAlias then
|
||||
TCEToolItem(chained).execute;
|
||||
end;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue