mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 02:58:05 +02:00
IDE: consistent check and typecast
This commit is contained in:
parent
8a80bb3b85
commit
e7126c8d19
@ -661,12 +661,12 @@ begin
|
||||
inherited Create;
|
||||
//debugln(['TDesigner.Create Self=',dbgs(Pointer(Self)),' TheDesignerForm=',DbgSName(TheDesignerForm)]);
|
||||
FForm := TheDesignerForm;
|
||||
if FForm is BaseFormEditor1.NonFormProxyDesignerForm[NonControlProxyDesignerFormId] then begin
|
||||
if FForm is INonControlDesigner then begin
|
||||
LNonControlDesigner := FForm as INonControlDesigner;
|
||||
FLookupRoot := LNonControlDesigner.LookupRoot;
|
||||
Mediator := LNonControlDesigner.Mediator;
|
||||
end
|
||||
else if FForm is BaseFormEditor1.NonFormProxyDesignerForm[FrameProxyDesignerFormId] then
|
||||
else if FForm is IFrameDesigner then
|
||||
FLookupRoot := (FForm as IFrameDesigner).LookupRoot
|
||||
else
|
||||
FLookupRoot := FForm;
|
||||
@ -784,6 +784,7 @@ procedure TDesigner.AddComponentCheckParent(var NewParent: TComponent;
|
||||
var
|
||||
NewParentControl: TWinControl;
|
||||
begin
|
||||
//debugln(['TDesigner.AddComponentCheckParent Mediator=',DbgSName(Mediator),' NewParent=',DbgSName(NewParent),' NewComponentClass=',NewComponentClass.ClassName]);
|
||||
if Mediator<>nil then begin
|
||||
// mediator, non LCL components
|
||||
if NewParent=nil then
|
||||
|
Loading…
Reference in New Issue
Block a user