commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r7186 - trunk/gnue-forms/src/GFObjects


From: reinhard
Subject: [gnue] r7186 - trunk/gnue-forms/src/GFObjects
Date: Sat, 12 Mar 2005 05:15:28 -0600 (CST)

Author: reinhard
Date: 2005-03-12 05:15:27 -0600 (Sat, 12 Mar 2005)
New Revision: 7186

Modified:
   trunk/gnue-forms/src/GFObjects/GFBlock.py
Log:
Synchronizing of the block with the underlying ResultSet is now done through
currentRecordChanged.


Modified: trunk/gnue-forms/src/GFObjects/GFBlock.py
===================================================================
--- trunk/gnue-forms/src/GFObjects/GFBlock.py   2005-03-12 11:12:42 UTC (rev 
7185)
+++ trunk/gnue-forms/src/GFObjects/GFBlock.py   2005-03-12 11:15:27 UTC (rev 
7186)
@@ -343,7 +343,10 @@
 
   # This gets called by the resultSet whenever the current record changes
   def currentRecordMoved (self):
-    self.switchRecord (self._resultSet.getRecordNumber() - self._currentRecord)
+    # Blocks can't cope with current record #-1
+    recno = self._resultSet.getRecordNumber ()
+    if recno != -1:
+      self.switchRecord (recno - self._currentRecord)
 
   #
   #
@@ -561,12 +564,9 @@
     # Our recordCount might have changed if records were deleted
     self._recordCount = self._resultSet.getRecordCount()
 
-    # If all records were deleted, create an empty new one, otherwise make sure
-    # we move the record pointer to the correct record
+    # If all records were deleted, create an empty new one.
     if not self._recordCount:
       self.newRecord()
-    else:
-      self.jumpRecord(self._precommitRecord)
 
     self.mode='normal'
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]