Don't close EvaluateDialog and Debug Inspector when docked

git-svn-id: trunk@60043 -
This commit is contained in:
michl 2019-01-09 14:25:58 +00:00
parent f32968dd25
commit ef57dae24f
4 changed files with 8 additions and 2 deletions

View File

@ -309,7 +309,7 @@ end;
procedure TEvaluateDlg.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Key = VK_ESCAPE then
if (Key = VK_ESCAPE) and not Docked then
Close
else
inherited;;

View File

@ -298,7 +298,7 @@ end;
procedure TIDEInspectDlg.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
if Key = VK_ESCAPE then
if (Key = VK_ESCAPE) and not Docked then
Close;
end;

View File

@ -1539,6 +1539,7 @@ type
KeepDockSiteSize: Boolean = true): Boolean; virtual;
function ReplaceDockedControl(Control: TControl; NewDockSite: TWinControl;
DropControl: TControl; ControlSide: TAlign): Boolean;
function Docked: Boolean;
function Dragging: Boolean;
// accessibility
function GetAccessibleObject: TLazAccessibleObject;

View File

@ -4876,6 +4876,11 @@ begin
EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.ReplaceDockedControl'){$ENDIF};
end;
function TControl.Docked: Boolean;
begin
Result := Assigned(Parent) and (Parent = HostDockSite) and (GetParentForm(Parent) <> Parent);
end;
procedure TControl.AddHandlerOnResize(const OnResizeEvent: TNotifyEvent;
AsFirst: boolean);
begin