mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Crash if close message dialog by 'X' window button
This commit is contained in:
parent
0001aeb611
commit
0df55731cb
2 changed files with 11 additions and 4 deletions
|
|
@ -12,14 +12,15 @@ object frmMsg: TfrmMsg
|
|||
ClientWidth = 426
|
||||
Constraints.MinWidth = 250
|
||||
KeyPreview = True
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnKeyDown = FormKeyDown
|
||||
OnKeyPress = FormKeyPress
|
||||
LCLVersion = '1.6.0.3'
|
||||
LCLVersion = '1.6.0.4'
|
||||
object lblMsg: TLabel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 12
|
||||
Height = 15
|
||||
Height = 18
|
||||
Top = 12
|
||||
Width = 402
|
||||
Align = alTop
|
||||
|
|
@ -33,8 +34,8 @@ object frmMsg: TfrmMsg
|
|||
object pnlButtons: TPanel
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 12
|
||||
Height = 203
|
||||
Top = 39
|
||||
Height = 200
|
||||
Top = 42
|
||||
Width = 402
|
||||
Align = alClient
|
||||
AutoSize = True
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ type
|
|||
lblMsg: TLabel;
|
||||
pnlButtons: TPanel;
|
||||
mnuOther: TPopupMenu;
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
procedure FormKeyPress(Sender: TObject; var Key: Char);
|
||||
|
|
@ -41,6 +42,11 @@ begin
|
|||
iSelected:= -1;
|
||||
end;
|
||||
|
||||
procedure TfrmMsg.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
begin
|
||||
if (iSelected < 0) and (Escape >= 0) then iSelected:= Escape;
|
||||
end;
|
||||
|
||||
procedure TfrmMsg.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
var
|
||||
Index: Integer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue