dabo Commit
Revision 3455
Date: 2007-10-11 09:52:55 -0700 (Thu, 11 Oct 2007)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/3455
Changed:
U trunk/dabo/ui/uiwx/dGrid.py
Log:
Added a private attribute to dGrid to determine whether to mediate bizobj row
changes through the form (True, the default) or through the bizobj directly.
Setting _mediateRowNumberThroughForm to False completely removed the flickering
on Windows for my grids, and I don't have any particular need for the form
mediation. We can discuss whether to make this a property, or whether to take
away form mediation completely (I haven't thought this through, so I don't know
what my opinion is), or perhaps we can clean up dForm._moveToRowNum() enough so
that it doesn't cause such a performance hit. For now, the attribute provides a
way for me to provide a better-performing grid to my customer.
Diff:
Modified: trunk/dabo/ui/uiwx/dGrid.py
===================================================================
--- trunk/dabo/ui/uiwx/dGrid.py 2007-10-11 15:21:02 UTC (rev 3454)
+++ trunk/dabo/ui/uiwx/dGrid.py 2007-10-11 16:52:55 UTC (rev 3455)
@@ -1612,6 +1612,9 @@
# Local count of rows in the data table
self._tableRows = 0
+ # When user selects new row, does the form have responsibility
for making the change?
+ self._mediateRowNumberThroughForm = True
+
# Used to provide 'data' when the DataSet is empty.
self.emptyRowsToAdd = 0
@@ -3091,7 +3094,7 @@
bizobj = self.getBizobj()
if bizobj:
if bizobj.RowCount > newRow and
bizobj.RowNumber != newRow:
- if isinstance(self.Form, dabo.ui.dForm)
and not isinstance(self.DataSource, dabo.biz.dBizobj):
+ if self._mediateRowNumberThroughForm
and isinstance(self.Form, dabo.ui.dForm) and not isinstance(self.DataSource,
dabo.biz.dBizobj):
# run it through the form:
if not
self.Form.moveToRowNumber(newRow, bizobj.DataSource):
dabo.ui.callAfter(self.refresh)
_______________________________________________
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/dabo-dev/[EMAIL PROTECTED]