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));
{$ENDIF}
Form := GetParentForm(Self);
if (Form<>nil)
and (not (csDestroyingHandle in ControlState))
and (not (csDestroying in ComponentState))
then begin
if Assigned(Form) and not (csDesigning in Form.ComponentState) and
not (csDestroyingHandle in ControlState) and not (csDestroying in ComponentState) then
begin
if not Form.SetFocusedControl(Self) then Exit;
Message.Result := 0;
end;