mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-31 11:00:32 +02:00
lcl: use Enable/DisableControls in TDBLookup. Issue #26356
git-svn-id: trunk@45578 -
This commit is contained in:
parent
aad031fb47
commit
1891880cc5
@ -243,7 +243,11 @@ begin
|
||||
if ListLinkDataSet.IsEmpty then
|
||||
Exit;
|
||||
Bookmark := ListLinkDataSet.GetBookmark;
|
||||
{$ifdef EnableLookupWithBlockRead}
|
||||
ListLinkDataSet.BlockReadSize := 1;
|
||||
{$else}
|
||||
ListLinkDataSet.DisableControls;
|
||||
{$endif}
|
||||
FControlItems.BeginUpdate;
|
||||
try
|
||||
//needed to handle sqldb.TSQLQuery that does not has a reliable recordcount after Open
|
||||
@ -269,7 +273,11 @@ begin
|
||||
FControlItems.EndUpdate;
|
||||
ListLinkDataSet.GotoBookmark(Bookmark);
|
||||
ListLinkDataSet.FreeBookmark(Bookmark);
|
||||
{$ifdef EnableLookupWithBlockRead}
|
||||
ListLinkDataSet.BlockReadSize := 0;
|
||||
{$else}
|
||||
ListLinkDataSet.EnableControls;
|
||||
{$endif}
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user