mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: Restore previous operation state after waiting for user response.
This commit is contained in:
parent
af7dad0ad5
commit
9ce8dda289
1 changed files with 5 additions and 1 deletions
|
|
@ -747,13 +747,17 @@ function TFileSourceOperation.AskQuestion(
|
|||
var
|
||||
i: Integer;
|
||||
bStateChanged: Boolean = False;
|
||||
OldState: TFileSourceOperationState;
|
||||
begin
|
||||
FStateLock.Acquire;
|
||||
try
|
||||
if FState in [fsosStopping, fsosStopped] then
|
||||
RaiseAbortOperation
|
||||
else
|
||||
begin
|
||||
OldState := FState;
|
||||
FState := fsosWaitingForFeedback;
|
||||
end;
|
||||
finally
|
||||
FStateLock.Release;
|
||||
end;
|
||||
|
|
@ -818,7 +822,7 @@ begin
|
|||
if FState = fsosWaitingForFeedback then
|
||||
begin
|
||||
UpdateStartTime(SysUtils.Now);
|
||||
FState := fsosRunning;
|
||||
FState := OldState;
|
||||
bStateChanged := True;
|
||||
end;
|
||||
finally
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue