LCL: do not set ActiveControl if Parent=nil, bug #17716

git-svn-id: trunk@27900 -
This commit is contained in:
mattias 2010-10-27 19:21:53 +00:00
parent 41a9300a55
commit 3b1f0f9a20

View File

@ -2577,7 +2577,8 @@ begin
// activate focus if visible // activate focus if visible
if Showing and (not (csDestroying in ComponentState)) then if Showing and (not (csDestroying in ComponentState)) then
begin begin
if Assigned(ActiveControl) and (not (csDesigning in ComponentState)) and Assigned(Parent) then if Assigned(ActiveControl) and (not (csDesigning in ComponentState))
and (Parent=nil) then
begin begin
// automatically choose a control to focus // automatically choose a control to focus
{$IFDEF VerboseFocus} {$IFDEF VerboseFocus}