]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixes for problem where selection fails to start on dragging mouse in
authorMichael Bedward <mbedward@ozemail.com.au>
Mon, 7 Feb 2000 05:39:28 +0000 (05:39 +0000)
committerMichael Bedward <mbedward@ozemail.com.au>
Mon, 7 Feb 2000 05:39:28 +0000 (05:39 +0000)
grid cell window.

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

include/wx/generic/grid.h
src/generic/grid.cpp

index e6aa4f7f7a6f7c720d967f3c45e0a596a344e1be..61912549dc979a4e2a2763b319e77d95f90c1ef6 100644 (file)
@@ -922,8 +922,7 @@ protected:
     int  m_batchCount;
 
     int  m_cursorMode;
-    enum { WXGRID_CURSOR_DEFAULT,
-           WXGRID_CURSOR_SELECT_CELL,
+    enum { WXGRID_CURSOR_SELECT_CELL,
            WXGRID_CURSOR_RESIZE_ROW,
            WXGRID_CURSOR_RESIZE_COL,
            WXGRID_CURSOR_SELECT_ROW,
index 88a2520a583aa5954bd8d49a5319c6528e687132..48e9a6b61ab8dddf2285124cefc4746f24d3d974 100644 (file)
@@ -1612,6 +1612,7 @@ void wxGrid::ProcessRowLabelMouseEvent( wxMouseEvent& event )
             }
         }
 
+        m_cursorMode  = WXGRID_CURSOR_SELECT_CELL;
         m_dragLastPos  = -1;
     }
 
@@ -1800,6 +1801,7 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event )
             }
         }
 
+        m_cursorMode  = WXGRID_CURSOR_SELECT_CELL;
         m_dragLastPos  = -1;
     }
 
@@ -2005,6 +2007,13 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event )
                 // no default action at the moment
             }
         }
+
+        // ------------ Moving and no button action
+        //
+        else if ( event.Moving() && !event.IsButton() )
+        {
+            m_cursorMode = WXGRID_CURSOR_SELECT_CELL;
+        }
     }
 }