]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't capture the mouse until after the possible wxEVT_GRID_CELL_BEGIN_DRAG event.
authorRobin Dunn <robin@alldunn.com>
Tue, 6 Feb 2007 21:52:23 +0000 (21:52 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 6 Feb 2007 21:52:23 +0000 (21:52 +0000)
(ported from 2.8 branch)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/grid.cpp

index 5a779c7682c4c96018eeb5f4eccaa830627c8cb5..e3436a823398ee3f85f040d84547b0fee945dd2c 100644 (file)
@@ -5921,13 +5921,6 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event )
                 SaveEditControlValue();
             }
 
-            // Have we captured the mouse yet?
-            if (! m_winCapture)
-            {
-                m_winCapture = m_gridWin;
-                m_winCapture->CaptureMouse();
-            }
-
             if ( coords != wxGridNoCellCoords )
             {
                 if ( event.CmdDown() )
@@ -5947,6 +5940,7 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event )
                                    coords.GetRow(),
                                    coords.GetCol(),
                                    event );
+                        return;
                     }
                 }
                 else
@@ -5968,6 +5962,14 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event )
                     // scrolling is way to fast, at least on MSW - also on GTK.
                 }
             }
+            // Have we captured the mouse yet?
+            if (! m_winCapture)
+            {
+                m_winCapture = m_gridWin;
+                m_winCapture->CaptureMouse();
+            }
+
+            
         }
         else if ( m_cursorMode == WXGRID_CURSOR_RESIZE_ROW )
         {