diff --git a/components/ideintf/componenttreeview.pas b/components/ideintf/componenttreeview.pas index dd933aea96..6a9fca9abb 100644 --- a/components/ideintf/componenttreeview.pas +++ b/components/ideintf/componenttreeview.pas @@ -747,7 +747,6 @@ begin FPersToChange := APersistent; FZOrderDelete := AZOrder; BuildComponentNodes(False); - Assert(FPersToChange=nil, 'TComponentTreeView.ChangeCompZOrder: FPersToChange is assigned.'); end; procedure TComponentTreeView.DeleteComponentNode(APersistent: TPersistent); @@ -755,7 +754,6 @@ begin FPersToChange := APersistent; FZOrderDelete := zoDelete; BuildComponentNodes(False); - Assert(FPersToChange=nil, 'TComponentTreeView.DeleteComponentNode: FPersToChange is assigned.'); end; procedure TComponentTreeView.UpdateCompNode(ANode: TTreeNode); diff --git a/designer/designer.pp b/designer/designer.pp index bbd4a74000..4bd74ad4aa 100644 --- a/designer/designer.pp +++ b/designer/designer.pp @@ -37,8 +37,9 @@ interface {off $DEFINE VerboseDesignerSelect} uses - // RTL + FCL + LCL - Types, Classes, Math, SysUtils, variants, TypInfo, + // RTL + FCL + Types, Classes, Math, SysUtils, Variants, TypInfo, + // LCL LCLProc, LCLType, LResources, LCLIntf, LMessages, InterfaceBase, Forms, Controls, GraphType, Graphics, Dialogs, ExtCtrls, Menus, ClipBrd, // LazUtils @@ -1631,10 +1632,21 @@ begin end; procedure TDesigner.NotifyComponentAdded(AComponent: TComponent); +var + i: Integer; + SubContrl: TControl; begin try if AComponent.Name='' then AComponent.Name:=UniqueName(AComponent.ClassName); + // Iterating Controls is needed at least for Side1 and Side2 of TPairSplitter. + if AComponent is TWinControl then + for i:=0 to TWinControl(AComponent).ControlCount-1 do + begin + SubContrl:=TWinControl(AComponent).Controls[i]; + if SubContrl.Name='' then + SubContrl.Name:=UniqueName(SubContrl.ClassName); + end; GlobalDesignHook.PersistentAdded(AComponent,false); except on E: Exception do diff --git a/ide/customformeditor.pp b/ide/customformeditor.pp index 654f51a9b2..7bc8cd22dd 100644 --- a/ide/customformeditor.pp +++ b/ide/customformeditor.pp @@ -1363,7 +1363,7 @@ begin AParent:=AParent.Parent; end; end; - DebugLn('Parent is '''+dbgsName(AParent)+''''); + //DebugLn('TCustomFormEditor.CreateComponent: Parent is '''+dbgsName(AParent)+''''); end else begin // create a toplevel component // -> a form or a datamodule or a custom component