dabo Commit
Revision 5788
Date: 2010-04-22 11:45:20 -0700 (Thu, 22 Apr 2010)
Author: Paul
Trac: http://trac.dabodev.com/changeset/5788

Changed:
U   trunk/dabo/ui/uiwx/dGrid.py

Log:
I found that the bizobj is still on the initial row if the user does one of the
following:

1) use the keyboard to navigate to the next record
2) click on any row with the mouse

So, until we determine if the datasourceBeingSet hack is even needed, I added a 
flag so I can turn the behavior off.



Diff:
Modified: trunk/dabo/ui/uiwx/dGrid.py
===================================================================
--- trunk/dabo/ui/uiwx/dGrid.py 2010-04-22 18:29:11 UTC (rev 5787)
+++ trunk/dabo/ui/uiwx/dGrid.py 2010-04-22 18:45:20 UTC (rev 5788)
@@ -1703,6 +1703,9 @@
        be accessed efficiently: only the data that needs to be shown on the 
current
        screen is copied and displayed.
        """
+
+       USE_DATASOURCE_BEING_SET_HACK = True
+
        def __init__(self, parent, properties=None, attProperties=None, *args, 
**kwargs):
                # Get scrollbar size from system metrics.
                self._scrollBarSize = 
wx.SystemSettings_GetMetric(wx.SYS_VSCROLL_X)
@@ -4164,7 +4167,8 @@
                        self._dataSource = val
                        self.fillGrid(True)
                        biz = self.getBizobj()
-                       self._dataSourceBeingSet = True
+                       if self.USE_DATASOURCE_BEING_SET_HACK:
+                               self._dataSourceBeingSet = True
                        if biz:
                                dabo.ui.setAfter(self, "CurrentRow", 
biz.RowNumber)
                                self.Form.bindEvent(dEvents.RowNumChanged, 
self.__onRowNumChanged)



_______________________________________________
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