mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 03:01:07 +08:00
Turn "Drop" confirmation dialogs into custom critical types, so we can set focus to the Cancel button. See http://www.heidisql.com/forum.php?t=14042
This commit is contained in:
@ -327,6 +327,7 @@ var
|
||||
AppSettings: TAppSettings;
|
||||
MutexHandle: THandle = 0;
|
||||
SystemImageList: TImageList;
|
||||
mtCriticalConfirmation: TMsgDlgType = mtCustom;
|
||||
|
||||
|
||||
implementation
|
||||
@ -2324,6 +2325,8 @@ var
|
||||
end;
|
||||
Btn.Caption := cap;
|
||||
Btn.ModalResult := BtnResult;
|
||||
if (DlgType = mtCriticalConfirmation) and (BtnResult = mrCancel) then
|
||||
Btn.Default := True;
|
||||
end;
|
||||
begin
|
||||
if (Win32MajorVersion >= 6) and StyleServices.Enabled then begin
|
||||
|
Reference in New Issue
Block a user