lcl: don't set ActiveControl for design-time forms (issue #0017951)

git-svn-id: trunk@28305 -
This commit is contained in:
paul 2010-11-18 02:05:43 +00:00
parent 91e0cd6ae7
commit d94f345335

View File

@ -5164,10 +5164,9 @@ begin
DebugLn('TWinControl.WndProc LM_SetFocus ',DbgSName(Self)); DebugLn('TWinControl.WndProc LM_SetFocus ',DbgSName(Self));
{$ENDIF} {$ENDIF}
Form := GetParentForm(Self); Form := GetParentForm(Self);
if (Form<>nil) if Assigned(Form) and not (csDesigning in Form.ComponentState) and
and (not (csDestroyingHandle in ControlState)) not (csDestroyingHandle in ControlState) and not (csDestroying in ComponentState) then
and (not (csDestroying in ComponentState)) begin
then begin
if not Form.SetFocusedControl(Self) then Exit; if not Form.SetFocusedControl(Self) then Exit;
Message.Result := 0; Message.Result := 0;
end; end;