Revert r51213 #2e3b9429b8 "IDE: Allow ComponentList to unselect a component. Issue #29348". It broke things.

git-svn-id: trunk@51315 -
This commit is contained in:
juha 2016-01-18 18:15:08 +00:00
parent 1bd944bb80
commit f0c2e0c63f

View File

@ -84,8 +84,6 @@ type
// List for Component inheritence view
FClassList: TStringList;
FKeepSelected: Boolean;
FFixedSelection: Boolean;
FPriorSelection: TTreeNode;
procedure ClearSelection;
procedure SelectionWasChanged;
procedure ComponentWasAdded({%H-}ALookupRoot, {%H-}AComponent: TComponent;
@ -202,8 +200,6 @@ end;
procedure TComponentListForm.SelectionWasChanged;
begin
if FFixedSelection then
Exit;
// ToDo: Select the component in active treeview.
if ListTree.IsVisible then
SelectTreeComp(ListTree)
@ -376,9 +372,6 @@ end;
procedure TComponentListForm.TreeFilterEdAfterFilter(Sender: TObject);
begin
if TreeFilterEd.Text = '' then
TreeFilterEd.FilteredTreeview.Selected := FPriorSelection;
FPriorSelection := nil;
UpdateButtonState;
end;
@ -393,15 +386,10 @@ procedure TComponentListForm.ComponentsChange(Sender: TObject; Node: TTreeNode);
var
AComponent: TRegisteredComponent;
begin
FFixedSelection := True;
try
AComponent:=GetSelectedComponent;
// Allow the selected component to be cleared
AComponent:=GetSelectedComponent;
if AComponent<>nil then
IDEComponentPalette.SetSelectedComp(AComponent, ssShift in GetKeyShiftState);
UpdateButtonState;
finally
FFixedSelection := False;
end;
UpdateButtonState;
end;
procedure TComponentListForm.TreeKeyPress(Sender: TObject; var Key: char);
@ -421,7 +409,6 @@ begin
1: TreeFilterEd.FilteredTreeview := PalletteTree;
2: TreeFilterEd.FilteredTreeview := InheritanceTree;
end;
FPriorSelection := TreeFilterEd.FilteredTreeview.Selected;
TreeFilterEd.InvalidateFilter;
PrevPageIndex := PageControl.PageIndex;
end;