If I have in a TZQuery:
Code: Select all
CachedUpdates = true
Filter = ""
The problem is here:
Code: Select all
if Active then
{InternalSort;}
{bangfauzan modification}
if (FSortedFields = '') then
Self.InternalRefresh
else
InternalSort;
{end of bangfauzan modification}
end;
I don't know if InternalRefresh is suposed to keep the changes or if FSortedFields is suposed to be get a value before this point to avoid this problem.
So if someone can help with a patch would be nice.
This is the full procedure on ZAbstractRODataset.pas.
Code: Select all
procedure TZAbstractRODataset.SetSortedFields({const} Value: string); {bangfauzan modification}
begin
Value:=Trim(Value); {bangfauzan addition}
if (FSortedFields <> Value) or (FIndexFieldNames <> Value)then {bangfauzan modification}
begin
FIndexFieldNames:=Value;
FSortType := GetSortType; {bangfauzan addition}
{removing ASC or DESC behind space}
if (FSortType <> stIgnored) then begin {pawelsel modification}
Value:=StringReplace(Value,' Desc','',[rfReplaceAll,rfIgnoreCase]);
Value:=StringReplace(Value,' Asc','',[rfReplaceAll,rfIgnoreCase]);
end;
FSortedFields := Value;
if Active then
{InternalSort;}
{bangfauzan modification}
if (FSortedFields = '') then
Self.InternalRefresh
else
InternalSort;
{end of bangfauzan modification}
end;
end;