X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23318a5358be74727fb62854f623da84a4545bcd..84056016e19cc83788bcbfe93f614d413c91a010:/src/generic/grid.cpp diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index a5978ae75d..acfdc88d3f 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -3830,15 +3830,6 @@ void wxGridStringTable::SetValue( int row, int col, const wxString& value ) m_data[row][col] = value; } -bool wxGridStringTable::IsEmptyCell( int row, int col ) -{ - wxCHECK_MSG( (row < GetNumberRows()) && (col < GetNumberCols()), - true, - _T("invalid row or column index in wxGridStringTable") ); - - return (m_data[row][col] == wxEmptyString); -} - void wxGridStringTable::Clear() { int row, col; @@ -4520,6 +4511,9 @@ bool wxGrid::Create(wxWindow *parent, wxWindowID id, wxGrid::~wxGrid() { + if ( m_winCapture ) + m_winCapture->ReleaseMouse(); + // Ensure that the editor control is destroyed before the grid is, // otherwise we crash later when the editor tries to do something with the // half destroyed grid @@ -6168,8 +6162,7 @@ void wxGrid::ChangeCursorMode(CursorMode mode, if ( m_winCapture ) { - if (m_winCapture->HasCapture()) - m_winCapture->ReleaseMouse(); + m_winCapture->ReleaseMouse(); m_winCapture = NULL; } @@ -6396,8 +6389,7 @@ wxGrid::DoGridCellLeftUp(wxMouseEvent& event, const wxGridCellCoords& coords) { if (m_winCapture) { - if (m_winCapture->HasCapture()) - m_winCapture->ReleaseMouse(); + m_winCapture->ReleaseMouse(); m_winCapture = NULL; } @@ -9038,7 +9030,7 @@ bool wxGrid::MovePageUp() bool wxGrid::MovePageDown() { return DoMoveCursorByPage( - wxGridForwardOperations(this, wxGridColumnOperations())); + wxGridForwardOperations(this, wxGridRowOperations())); } // helper of DoMoveCursorByBlock(): advance the cell coordinates using diroper