UPD: Reduce reloading filelist after execute operation.

This commit is contained in:
cobines 2012-03-13 13:06:50 +00:00
commit f4c598dd45
3 changed files with 8 additions and 6 deletions

View file

@ -85,7 +85,7 @@ begin
begin
case ShowModal of
mrCancel:
Result:= fseorSuccess;
Result:= fseorCancelled;
mrOK:
Result:= fseorYourSelf;
mrAll:
@ -162,4 +162,4 @@ begin
end;
end.

View file

@ -16,6 +16,7 @@ type
TFileSourceExecuteOperationResult =
(fseorSuccess, //<en the command was executed successfully
fseorError, //<en execution failed
fseorCancelled, //<en cancelled by user (nothing happened)
fseorYourSelf, //<en DC should download/extract the file and execute it locally
fseorWithAll, //<en DC should download/extract all files and execute chosen file locally
fseorSymLink); //<en this was a (symbolic) link or .lnk file pointing to a different directory
@ -79,6 +80,7 @@ begin
FExecutableFile := aExecutableFile;
aExecutableFile := nil;
FVerb := aVerb;
FExecuteOperationResult := fseorCancelled;
FAbsolutePath := FExecutableFile.FullPath;
FRelativePath := FExecutableFile.Name;
@ -102,8 +104,9 @@ end;
procedure TFileSourceExecuteOperation.DoReloadFileSources;
begin
FFileSource.Reload(FCurrentPath);
if FExecuteOperationResult <> fseorCancelled then
FFileSource.Reload(FCurrentPath);
end;
end.

View file

@ -128,7 +128,6 @@ begin
end;
end;
end; // case
aFileView.Reload;
end; // assigned
finally
FreeAndNil(aFileCopy);
@ -313,4 +312,4 @@ begin
end;
end.