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