lcl: don't terminate application if mainform modalresult = mrCancel (issue #0009585)

git-svn-id: trunk@14545 -
This commit is contained in:
paul 2008-03-16 08:27:39 +00:00
parent 20471862d5
commit 640c672c38
2 changed files with 3 additions and 11 deletions

View File

@ -1075,26 +1075,18 @@ end;
control is passed to event processor.
------------------------------------------------------------------------------}
procedure TApplication.RunLoop;
procedure RunMessage;
begin
HandleMessage;
if Assigned(FMainForm) and (FMainForm.ModalResult = mrCancel)
then Terminate;
end;
begin
repeat
if CaptureExceptions then begin
// run with try..except
try
RunMessage;
HandleMessage;
except
on E: Exception do HandleException(E);
end;
end else begin
// run without try..except
RunMessage;
HandleMessage;
end;
until Terminated;
end;

View File

@ -48,7 +48,7 @@ end;
------------------------------------------------------------------------------}
function TCustomCheckBox.GetState: TCheckBoxState;
begin
fState:=RetrieveState;
fState := RetrieveState;
Result := fState;
end;