mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 23:49:07 +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;
|
end;
|
||||||
CreateTable;
|
CreateTable;
|
||||||
If CopyData then
|
If CopyData then
|
||||||
begin
|
begin
|
||||||
Open;
|
Open;
|
||||||
OriginalPosition:=Dataset.GetBookmark;
|
|
||||||
L1:=TList.Create;
|
L1:=TList.Create;
|
||||||
Try
|
Try
|
||||||
L2:=TList.Create;
|
L2:=TList.Create;
|
||||||
@ -1005,7 +1004,9 @@ begin
|
|||||||
L1.Add(F1);
|
L1.Add(F1);
|
||||||
L2.Add(F2);
|
L2.Add(F2);
|
||||||
end;
|
end;
|
||||||
|
DisableControls;
|
||||||
Dataset.DisableControls;
|
Dataset.DisableControls;
|
||||||
|
OriginalPosition:=Dataset.GetBookmark;
|
||||||
Try
|
Try
|
||||||
Dataset.Open;
|
Dataset.Open;
|
||||||
Dataset.First; //make sure we copy from the beginning
|
Dataset.First; //make sure we copy from the beginning
|
||||||
@ -1039,7 +1040,9 @@ begin
|
|||||||
Dataset.Next;
|
Dataset.Next;
|
||||||
end;
|
end;
|
||||||
Finally
|
Finally
|
||||||
|
DataSet.GotoBookmark(OriginalPosition); //Return to original record
|
||||||
Dataset.EnableControls;
|
Dataset.EnableControls;
|
||||||
|
EnableControls;
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
L2.Free;
|
L2.Free;
|
||||||
@ -1047,8 +1050,7 @@ begin
|
|||||||
finally
|
finally
|
||||||
l1.Free;
|
l1.Free;
|
||||||
end;
|
end;
|
||||||
DataSet.GotoBookmark(OriginalPosition); //Return to original record
|
end;
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMemDataset.GetRecordBufferPointer(p:TRecordBuffer; Pos:Integer):TRecordBuffer;
|
function TMemDataset.GetRecordBufferPointer(p:TRecordBuffer; Pos:Integer):TRecordBuffer;
|
||||||
|
Loading…
Reference in New Issue
Block a user