ソースを参照

Merged revisions 2181 via svnmerge from
svn+ssh://www.freepascal.org/FPC/svn/fpc/trunk

........
r2181 | joost | 2006-01-05 16:53:46 +0100 (Thu, 05 Jan 2006) | 3 lines

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

git-svn-id: branches/fixes_2_0@2182 -

joost 19 年 前
コミット
3e2db3f349
2 ファイル変更4 行追加2 行削除
  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
   CheckBrowseMode;
+  if IsEmpty then exit;
   SaveBookMark := GetRecNo;
 
   r := 0;
@@ -639,7 +640,6 @@ begin
       end;
     inc(r);
     end;
-  Refresh;
   if not GetDeleted(pbyte(FBBuffers[savebookmark])) then
     begin
     InternalGotoBookMark(@SaveBookMark);

+ 3 - 1
fcl/db/dataset.inc

@@ -1773,7 +1773,9 @@ begin
   CheckbrowseMode;
   UpdateCursorPos;
   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([]);
 end;