]> git.saurik.com Git - wxWidgets.git/commitdiff
Restricted column/row resizing in cell window to left button for consistency
authorStefan Neis <Stefan.Neis@t-online.de>
Sat, 28 Jun 2008 00:10:20 +0000 (00:10 +0000)
committerStefan Neis <Stefan.Neis@t-online.de>
Sat, 28 Jun 2008 00:10:20 +0000 (00:10 +0000)
        with label windows and because ending the resize is only handled in
        case of LeftUp() (Fixing #4212).

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

src/generic/grid.cpp

index a83b7ed2d17fb079f5a7206dc24083850db2e5ec..e6eb4b3a83e8bcac2af891a29774a9f791e0ba5d 100644 (file)
@@ -6020,7 +6020,8 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event )
 
 
         }
-        else if ( m_cursorMode == WXGRID_CURSOR_RESIZE_ROW )
+        else if ( event.LeftIsDown() &&
+                  m_cursorMode == WXGRID_CURSOR_RESIZE_ROW )
         {
             int cw, ch, left, dummy;
             m_gridWin->GetClientSize( &cw, &ch );
@@ -6038,7 +6039,8 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event )
             dc.DrawLine( left, y, left+cw, y );
             m_dragLastPos = y;
         }
-        else if ( m_cursorMode == WXGRID_CURSOR_RESIZE_COL )
+        else if ( event.LeftIsDown() &&
+                  m_cursorMode == WXGRID_CURSOR_RESIZE_COL )
         {
             int cw, ch, dummy, top;
             m_gridWin->GetClientSize( &cw, &ch );