lcl: revert 37154 #09e587db69 since was leading to bug #22004 and check for FDataLink.Active in ActiveChange

git-svn-id: trunk@37247 -
This commit is contained in:
blikblum 2012-05-10 23:13:53 +00:00
parent 2ae6c90244
commit a99204022d

View File

@ -46,7 +46,8 @@ end;
procedure TDBLookupComboBox.ActiveChange(Sender: TObject);
begin
UpdateLookup;
if FDataLink.Active then
UpdateLookup;
end;
procedure TDBLookupComboBox.DataChange(Sender: TObject);
@ -171,18 +172,14 @@ procedure TDBLookupComboBox.UpdateLookup;
var
i: Integer;
begin
if ([csLoading, csDestroying] * ComponentState) <> [] then Exit;
if FDataLink.Active then
begin;
if ([csLoading, csDestroying] * ComponentState) = [] then
begin
FLookup.Initialize(FDataLink, Items);
i := FLookup.GetKeyIndex;
end
else i := -1;
ItemIndex := i;
if i = -1 then
Text := '';
ItemIndex := i;
if i = -1 then
Text := '';
end;
end;
procedure TDBLookupComboBox.CloseUp;