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);
//Close the form on escape key like every other IDE dialog does
begin
if Key=VK_ESCAPE
then Close;
if (Key=VK_ESCAPE) and (Parent=nil) then
Close;
end;
procedure TComponentListForm.PatternEditChange(Sender: TObject);

View File

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

View File

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