mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-08 19:47:30 +01:00
test for destroying controls, so they do not get focus
git-svn-id: trunk@5353 -
This commit is contained in:
parent
82ad9e0e7d
commit
3b4effd0ac
@ -1271,9 +1271,11 @@ end;
|
||||
{------------------------------------------------------------------------------
|
||||
TCustomForm Method SetFocusedControl
|
||||
------------------------------------------------------------------------------}
|
||||
function TCustomForm.SetFocusedControl(Control : TWinControl): Boolean;
|
||||
function TCustomForm.SetFocusedControl(Control: TWinControl): Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
|
||||
if (csDestroying in Control.ComponentState) then exit;
|
||||
|
||||
// update FActiveControl
|
||||
if FDesigner = nil then
|
||||
@ -1599,6 +1601,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.132 2004/03/30 19:08:29 mattias
|
||||
test for destroying controls, so they do not get focus
|
||||
|
||||
Revision 1.131 2004/03/08 22:36:01 mattias
|
||||
added TWinControl.ParentFormInitializeWnd
|
||||
|
||||
|
||||
@ -89,6 +89,9 @@ end;
|
||||
|
||||
procedure TScreen.MoveFormToFocusFront(ACustomForm: TCustomForm);
|
||||
begin
|
||||
if (Self=nil) or (ACustomForm=nil)
|
||||
or (csDestroying in ACustomForm.ComponentState) then
|
||||
RaiseGDBException('TScreen.MoveFormToFocusFront');
|
||||
FCustomForms.Remove(ACustomForm);
|
||||
FCustomForms.Insert(0, ACustomForm);
|
||||
if ACustomForm is TForm then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user