Browse Source

+ do not try to applyupdates on an empty dataset
+ removed obsolete refresh from applyupdates
+ removed obsolete SetCurrentRecord

git-svn-id: trunk@2181 -

joost 19 years ago
parent
commit
5e631df4cc
2 changed files with 4 additions and 2 deletions
  1. 1 1
      fcl/db/bufdataset.inc
  2. 3 1
      fcl/db/dataset.inc

+ 1 - 1
fcl/db/bufdataset.inc

@@ -593,6 +593,7 @@ var SaveBookmark : Integer;
 
 
 begin
 begin
   CheckBrowseMode;
   CheckBrowseMode;
+  if IsEmpty then exit;
   SaveBookMark := GetRecNo;
   SaveBookMark := GetRecNo;
 
 
   r := 0;
   r := 0;
@@ -639,7 +640,6 @@ begin
       end;
       end;
     inc(r);
     inc(r);
     end;
     end;
-  Refresh;
   if not GetDeleted(pbyte(FBBuffers[savebookmark])) then
   if not GetDeleted(pbyte(FBBuffers[savebookmark])) then
     begin
     begin
     InternalGotoBookMark(@SaveBookMark);
     InternalGotoBookMark(@SaveBookMark);

+ 3 - 1
fcl/db/dataset.inc

@@ -1773,7 +1773,9 @@ begin
   CheckbrowseMode;
   CheckbrowseMode;
   UpdateCursorPos;
   UpdateCursorPos;
   InternalRefresh;
   InternalRefresh;
-  SetCurrentRecord(FActiverecord);
+{ SetCurrentRecord is called by UpdateCursorPos already, so as long as
+  InternalRefresh doesn't do strange things this should be ok. }
+//  SetCurrentRecord(FActiverecord);
   Resync([]);
   Resync([]);
 end;
 end;