mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 09:29:35 +02:00
lcl: don't terminate application if mainform modalresult = mrCancel (issue #0009585)
git-svn-id: trunk@14545 -
This commit is contained in:
parent
20471862d5
commit
640c672c38
@ -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;
|
||||
|
@ -48,7 +48,7 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
function TCustomCheckBox.GetState: TCheckBoxState;
|
||||
begin
|
||||
fState:=RetrieveState;
|
||||
fState := RetrieveState;
|
||||
Result := fState;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user