IDE: do not close docked forms on escape

git-svn-id: trunk@26270 -
This commit is contained in:
mattias 2010-06-22 22:45:09 +00:00
parent be1fa2943a
commit 7f8a4f287d
3 changed files with 5 additions and 5 deletions

View File

@ -375,8 +375,8 @@ end;
procedure TComponentListForm.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); procedure TComponentListForm.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
//Close the form on escape key like every other IDE dialog does //Close the form on escape key like every other IDE dialog does
begin begin
if Key=VK_ESCAPE if (Key=VK_ESCAPE) and (Parent=nil) then
then Close; Close;
end; end;
procedure TComponentListForm.PatternEditChange(Sender: TObject); procedure TComponentListForm.PatternEditChange(Sender: TObject);

View File

@ -301,7 +301,7 @@ end;//Create
procedure TSearchResultsView.FormKeyDown(Sender: TObject; var Key: Word; procedure TSearchResultsView.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState); Shift: TShiftState);
begin begin
if Key = VK_ESCAPE then if (Key = VK_ESCAPE) and (Parent=nil) then
begin begin
Key := VK_UNKNOWN; Key := VK_UNKNOWN;
Close; Close;

View File

@ -39,7 +39,7 @@ interface
uses uses
Classes, SysUtils, LCLProc, Forms, Controls, Buttons, ComCtrls, Classes, SysUtils, LCLProc, Forms, Controls, Buttons, ComCtrls,
StdCtrls, Menus, Dialogs, Graphics, FileCtrl, StdCtrls, Menus, Dialogs, Graphics, FileCtrl, LCLType,
AVL_Tree, AVL_Tree,
IDECommands, PackageIntf, IDECommands, PackageIntf,
LazConf, LazarusIDEStrConsts, IDEProcs, IDEOptionDefs, EnvironmentOpts, LazConf, LazarusIDEStrConsts, IDEProcs, IDEOptionDefs, EnvironmentOpts,
@ -249,7 +249,7 @@ end;
procedure TPkgGraphExplorerDlg.InfoMemoKeyDown(Sender: TObject; procedure TPkgGraphExplorerDlg.InfoMemoKeyDown(Sender: TObject;
var Key: Word; Shift: TShiftState); var Key: Word; Shift: TShiftState);
begin begin
if Key = 27 then if (Key = VK_ESCAPE) and (Parent=nil) then
Close; Close;
end; end;