mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 16:49:12 +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,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;
|
||||||
|
Loading…
Reference in New Issue
Block a user