dabo Commit
Revision 4205
Date: 2008-06-27 16:04:41 -0700 (Fri, 27 Jun 2008)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/4205

Changed:
U   trunk/dabo/lib/datanav2/Grid.py

Log:
Fixed the datanav2 Grid to only process the double-click if it happened in an 
actual cell. Prior to this, I was getting NoRecordsException from my app when 
the user double-clicked an empty grid. Also, clicking in an area of a grid 
with no cells will no longer do the processEditRecord(), which is what we
really expect.



Diff:
Modified: trunk/dabo/lib/datanav2/Grid.py
===================================================================
--- trunk/dabo/lib/datanav2/Grid.py     2008-06-27 22:49:18 UTC (rev 4204)
+++ trunk/dabo/lib/datanav2/Grid.py     2008-06-27 23:04:41 UTC (rev 4205)
@@ -60,7 +60,8 @@
                """ Occurs when the user double-clicks a cell in the grid. 
                By default, this is interpreted as a request to edit the record.
                """
-               self.processEditRecord()
+               if evt.EventData["col"] is not None and evt.EventData["row"] is 
not None:
+                       self.processEditRecord()
 
        def processEditRecord(self):
                ## FormType is a prop of datanav forms. Even though we expect 
Grid to be 




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to