X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/038a5591e46b59a57e80738120c68eed69db7fed..2d138379016e86c0625162f9ba0286233430a183:/src/generic/grid.cpp diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index e4559c6849..f60e2bced6 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -32,10 +32,6 @@ #if wxUSE_GRID -#if !defined(wxUSE_NEW_GRID) || !(wxUSE_NEW_GRID) - #include "gridg.cpp" -#else // wxUSE_NEW_GRID - #ifndef WX_PRECOMP #include "wx/utils.h" #include "wx/dcclient.h" @@ -5410,15 +5406,15 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event ) { if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL ) { + if (m_winCapture) + { + if (m_winCapture->HasCapture()) m_winCapture->ReleaseMouse(); + m_winCapture = NULL; + } + if ( m_selectingTopLeft != wxGridNoCellCoords && m_selectingBottomRight != wxGridNoCellCoords ) { - if (m_winCapture) - { - if (m_winCapture->HasCapture()) m_winCapture->ReleaseMouse(); - m_winCapture = NULL; - } - if ( m_selection ) { m_selection->SelectBlock( m_selectingTopLeft.GetRow(), @@ -8002,7 +7998,7 @@ bool wxGrid::MovePageUp() int y = GetRowTop(row); int newRow = YToRow( y - ch + 1 ); - if ( newRow == -1 ) + if ( newRow < 0 ) { newRow = 0; } @@ -10031,7 +10027,5 @@ wxGridEditorCreatedEvent::wxGridEditorCreatedEvent(int id, wxEventType type, m_ctrl = ctrl; } - -#endif // !wxUSE_NEW_GRID/wxUSE_NEW_GRID - #endif // wxUSE_GRID +