mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 13:20:21 +02:00
IDE: Cleanup ComponentList code.
git-svn-id: trunk@52436 -
This commit is contained in:
parent
44ae5e635a
commit
21b3356fc3
@ -288,10 +288,11 @@ begin
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
Node := InheritanceTree.Items.AddChildObject(Node, ClssName, Comp);
|
Node := InheritanceTree.Items.AddChildObject(Node, ClssName, Comp);
|
||||||
CurIcon := nil;
|
if Comp is TPkgComponent then
|
||||||
if (Comp is TPkgComponent) then
|
CurIcon := TPkgComponent(Comp).Icon
|
||||||
CurIcon := TPkgComponent(Comp).Icon;
|
else
|
||||||
if CurIcon <> nil then
|
CurIcon := nil;
|
||||||
|
if Assigned(CurIcon) then
|
||||||
begin
|
begin
|
||||||
Node.ImageIndex := imInheritance.Add(CurIcon, nil);
|
Node.ImageIndex := imInheritance.Add(CurIcon, nil);
|
||||||
Node.SelectedIndex := Node.ImageIndex;
|
Node.SelectedIndex := Node.ImageIndex;
|
||||||
@ -346,10 +347,11 @@ begin
|
|||||||
AListNode := ListTree.Items.AddChildObject(Nil, Comps[j], Comp);
|
AListNode := ListTree.Items.AddChildObject(Nil, Comps[j], Comp);
|
||||||
// Palette layout item
|
// Palette layout item
|
||||||
APaletteNode := PalletteTree.Items.AddChildObject(ParentNode, Comps[j], Comp);
|
APaletteNode := PalletteTree.Items.AddChildObject(ParentNode, Comps[j], Comp);
|
||||||
CurIcon := nil;
|
if Comp is TPkgComponent then
|
||||||
if (Comp is TPkgComponent) then
|
CurIcon := TPkgComponent(Comp).Icon
|
||||||
CurIcon := TPkgComponent(Comp).Icon;
|
else
|
||||||
if CurIcon <> nil then
|
CurIcon := nil;
|
||||||
|
if Assigned(CurIcon) then
|
||||||
begin
|
begin
|
||||||
AListNode.ImageIndex := imListPalette.Add(CurIcon, nil);
|
AListNode.ImageIndex := imListPalette.Add(CurIcon, nil);
|
||||||
AListNode.SelectedIndex := AListNode.ImageIndex;
|
AListNode.SelectedIndex := AListNode.ImageIndex;
|
||||||
@ -455,7 +457,6 @@ begin
|
|||||||
FPageControlChange := False;
|
FPageControlChange := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TComponentListForm.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
procedure TComponentListForm.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||||
begin
|
begin
|
||||||
if Parent=nil then begin
|
if Parent=nil then begin
|
||||||
|
Loading…
Reference in New Issue
Block a user