dabo Commit
Revision 3312
Date: 2007-08-14 14:40:33 -0700 (Tue, 14 Aug 2007)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/3312

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

Log:
Added Larry's patch to dGrid, which should help keep grid column sizing from 
triggering processSort(), although I think this just hides a deeper problem.

Because the column hasn't been sized yet, getColByX() still has the old 
column sizes. However, we are getting x from the mousemove event, which will
have the position of the mouse at the point of the move. So, move the mouse
more than the fudge amount before mousemove fires, and our code won't realize
that the grid column is sizing.

I don't really know what else to do, save ask wxPython to provide an event
to let us know when a size action is happening instead of merely when it is
complete.


Diff:
Modified: trunk/dabo/ui/uiwx/dGrid.py
===================================================================
--- trunk/dabo/ui/uiwx/dGrid.py 2007-08-14 20:35:15 UTC (rev 3311)
+++ trunk/dabo/ui/uiwx/dGrid.py 2007-08-14 21:40:33 UTC (rev 3312)
@@ -2897,7 +2897,6 @@
                if app is not None:
                        col._persist("Width")
 
-
        def _onGridHeaderMouseMove(self, evt):
                headerIsDragging = self._headerDragging
                headerIsSizing = self._headerSizing
@@ -2908,8 +2907,8 @@
                if dragging:
                        x,y = evt.EventData["mousePosition"]
 
-                       if not headerIsSizing and (
-                               self.getColNumByX(x) == self.getColNumByX(x-2) 
== self.getColNumByX(x+2)):
+                       if not headerIsSizing and 
+                                       (self.getColNumByX(x) == 
self.getColNumByX(x-5) == self.getColNumByX(x+5)):
                                if not headerIsDragging:
                                        if self.MovableColumns:
                                                # A header reposition is 
beginning




_______________________________________________
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]

Reply via email to