mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 14:19:28 +02:00
* Add enable/disablecontrols for target dataset (patch from Luiz Americo, bug ID #26364)
git-svn-id: trunk@28004 -
This commit is contained in:
parent
5bf2b9f8d2
commit
f1bd08acce
@ -990,9 +990,8 @@ begin
|
||||
end;
|
||||
CreateTable;
|
||||
If CopyData then
|
||||
begin
|
||||
begin
|
||||
Open;
|
||||
OriginalPosition:=Dataset.GetBookmark;
|
||||
L1:=TList.Create;
|
||||
Try
|
||||
L2:=TList.Create;
|
||||
@ -1005,7 +1004,9 @@ begin
|
||||
L1.Add(F1);
|
||||
L2.Add(F2);
|
||||
end;
|
||||
DisableControls;
|
||||
Dataset.DisableControls;
|
||||
OriginalPosition:=Dataset.GetBookmark;
|
||||
Try
|
||||
Dataset.Open;
|
||||
Dataset.First; //make sure we copy from the beginning
|
||||
@ -1039,7 +1040,9 @@ begin
|
||||
Dataset.Next;
|
||||
end;
|
||||
Finally
|
||||
DataSet.GotoBookmark(OriginalPosition); //Return to original record
|
||||
Dataset.EnableControls;
|
||||
EnableControls;
|
||||
end;
|
||||
finally
|
||||
L2.Free;
|
||||
@ -1047,8 +1050,7 @@ begin
|
||||
finally
|
||||
l1.Free;
|
||||
end;
|
||||
DataSet.GotoBookmark(OriginalPosition); //Return to original record
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TMemDataset.GetRecordBufferPointer(p:TRecordBuffer; Pos:Integer):TRecordBuffer;
|
||||
|
Loading…
Reference in New Issue
Block a user