Browse Source

* Merging revisions 925 from trunk:
------------------------------------------------------------------------
r925 | michael | 2020-11-10 10:35:17 +0100 (Tue, 10 Nov 2020) | 1 line

* Check browse mode before setting recno
------------------------------------------------------------------------

michael 4 years ago
parent
commit
f0f1855f73
1 changed files with 3 additions and 1 deletions
  1. 3 1
      packages/fcl-db/jsondataset.pas

+ 3 - 1
packages/fcl-db/jsondataset.pas

@@ -1747,10 +1747,12 @@ end;
 
 procedure TBaseJSONDataSet.SetRecNo(Value: Integer);
 begin
+  CheckBrowseMode;
+  DoBeforeScroll;
   if (Value < 1) or (Value > FCurrentIndex.Count) then
     raise EJSONDataset.CreateFmt('%s: SetRecNo: index %d out of range',[Name,Value]);
   FCurrent := Value - 1;
-  Resync([]); 
+  Resync([]);
   DoAfterScroll;
 end;