dabo Commit
Revision 4446
Date: 2008-08-26 01:36:12 -0700 (Tue, 26 Aug 2008)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/4446
Changed:
U trunk/dabo/ui/uiwx/dGrid.py
Log:
So Mac and Linux didn't like my changes to dGrid. This commit brackets the code
by platform. Now to test on Mac.
Diff:
Modified: trunk/dabo/ui/uiwx/dGrid.py
===================================================================
--- trunk/dabo/ui/uiwx/dGrid.py 2008-08-26 08:20:02 UTC (rev 4445)
+++ trunk/dabo/ui/uiwx/dGrid.py 2008-08-26 08:36:12 UTC (rev 4446)
@@ -100,6 +100,11 @@
def GetColLabelValue(self, col):
+ if sys.platform[:3] != "win":
+ # Windows performs better drawing the header in
response to EVT_PAINT,
+ # while Mac and Linux perform better doing it the old
way, in response
+ # to table.getColLabelValue().
+ self.grid._paintHeader(self.grid.Columns[col])
return ""
@@ -3684,12 +3689,17 @@
def __onWxHeaderPaint(self, evt):
- w = self._getWxHeader()
- w._updateBox = w.GetUpdateRegion().GetBox()
self.raiseEvent(dEvents.GridHeaderPaint, evt)
evt.Skip()
- dabo.ui.callAfter(self._paintHeader)
+ if sys.platform[:3] == "win":
+ # Windows performs better drawing the header in
response to EVT_PAINT,
+ # while Mac and Linux perform better doing it the old
way, in response
+ # to table.getColLabelValue().
+ w = self._getWxHeader()
+ w._updateBox = w.GetUpdateRegion().GetBox()
+ dabo.ui.callAfter(self._paintHeader)
+
def _getColRowForPosition(self, pos):
"""Used in the mouse event handlers to stuff the col, row into
EventData."""
col = self.getColNumByX(pos[0])
_______________________________________________
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]