mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-04 22:58:36 +02:00
fcl-db: bufdataset: when index is added set IndexDefs.Updated to false to signal, that FIndexDefs and FIndexes are not synchronized. This allow next call to IndexDefs.Update (which tests Updated) do synchronization.
git-svn-id: trunk@23723 -
This commit is contained in:
parent
c7f1569156
commit
1533aff2cc
@ -1682,20 +1682,21 @@ begin
|
||||
inc(FIndexesCount);
|
||||
setlength(FIndexes,FIndexesCount); // This invalidates the currentindex! -> not anymore
|
||||
FCurrentIndex:=FIndexes[StoreIndNr];
|
||||
|
||||
if IsUniDirectional then
|
||||
FIndexes[FIndexesCount-1] := TUniDirectionalBufIndex.Create(self)
|
||||
else
|
||||
FIndexes[FIndexesCount-1] := TDoubleLinkedBufIndex.Create(self);
|
||||
// FIndexes[FIndexesCount-1] := TArrayBufIndex.Create(self);
|
||||
FIndexes[FIndexesCount-1].InitialiseIndex;
|
||||
with (FIndexes[FIndexesCount-1] as TBufIndex) do
|
||||
with FIndexes[FIndexesCount-1] do
|
||||
begin
|
||||
InitialiseIndex;
|
||||
IndNr:=FIndexesCount-1;
|
||||
Name:=AName;
|
||||
FieldsName:=AFields;
|
||||
DescFields:=ADescFields;
|
||||
CaseinsFields:=ACaseInsFields;
|
||||
Options:=AOptions;
|
||||
IndNr:=FIndexesCount-1;
|
||||
end;
|
||||
|
||||
if Active then
|
||||
@ -1705,6 +1706,8 @@ begin
|
||||
end
|
||||
else if FIndexesCount>FMaxIndexesCount then
|
||||
FMaxIndexesCount := FIndexesCount;
|
||||
|
||||
FIndexDefs.Updated:=false;
|
||||
end;
|
||||
|
||||
procedure TCustomBufDataset.SetIndexFieldNames(const AValue: String);
|
||||
@ -1721,6 +1724,7 @@ begin
|
||||
BuildIndex(FIndexes[1]);
|
||||
Resync([rmCenter]);
|
||||
end;
|
||||
FIndexDefs.Updated:=false;
|
||||
end
|
||||
else
|
||||
SetIndexName('');
|
||||
|
Loading…
Reference in New Issue
Block a user