From 7c9336f367a38328d00b85c54717227ce395a932 Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 24 Nov 2010 03:54:04 +0000 Subject: [PATCH] anchordocking: fix endless loop git-svn-id: trunk@28441 - --- examples/anchordocking/design/registeranchordocking.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/anchordocking/design/registeranchordocking.pas b/examples/anchordocking/design/registeranchordocking.pas index bf8b9701b2..780c03915e 100644 --- a/examples/anchordocking/design/registeranchordocking.pas +++ b/examples/anchordocking/design/registeranchordocking.pas @@ -438,8 +438,10 @@ begin Parent:=GetParentForm(AForm); Parent.ShowOnTop; if (OldActiveControl<>nil) and OldActiveControl.CanFocus then + begin Parent.ActiveControl:=OldActiveControl; - AForm.SetFocus; + Parent.SetFocus; + end; //debugln(['TIDEAnchorDockMaster.ShowForm AForm.ActiveControl=',dbgsname(AForm.ActiveControl),' ',DbgSName(Parent.ActiveControl),' ',DbgSName(FindControl(GetFocus))]); end; end;