mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 14:49:28 +02:00
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:
parent
2ae6c90244
commit
a99204022d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user