IDE: Cleanup ComponentList code.

git-svn-id: trunk@52436 -
This commit is contained in:
juha 2016-06-04 09:12:24 +00:00
parent 44ae5e635a
commit 21b3356fc3

View File

@ -288,10 +288,11 @@ begin
else
begin
Node := InheritanceTree.Items.AddChildObject(Node, ClssName, Comp);
CurIcon := nil;
if (Comp is TPkgComponent) then
CurIcon := TPkgComponent(Comp).Icon;
if CurIcon <> nil then
if Comp is TPkgComponent then
CurIcon := TPkgComponent(Comp).Icon
else
CurIcon := nil;
if Assigned(CurIcon) then
begin
Node.ImageIndex := imInheritance.Add(CurIcon, nil);
Node.SelectedIndex := Node.ImageIndex;
@ -346,10 +347,11 @@ begin
AListNode := ListTree.Items.AddChildObject(Nil, Comps[j], Comp);
// Palette layout item
APaletteNode := PalletteTree.Items.AddChildObject(ParentNode, Comps[j], Comp);
CurIcon := nil;
if (Comp is TPkgComponent) then
CurIcon := TPkgComponent(Comp).Icon;
if CurIcon <> nil then
if Comp is TPkgComponent then
CurIcon := TPkgComponent(Comp).Icon
else
CurIcon := nil;
if Assigned(CurIcon) then
begin
AListNode.ImageIndex := imListPalette.Add(CurIcon, nil);
AListNode.SelectedIndex := AListNode.ImageIndex;
@ -455,7 +457,6 @@ begin
FPageControlChange := False;
end;
procedure TComponentListForm.FormClose(Sender: TObject; var CloseAction: TCloseAction);
begin
if Parent=nil then begin