From: Julian Smart Date: Wed, 11 Sep 2002 14:12:48 +0000 (+0000) Subject: Reverted previous 'fixes' now that the array bug has been cured X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/dcdce64e665eb3bb8d97d4fb819a5cbe829b6f45 Reverted previous 'fixes' now that the array bug has been cured Prevented dragging dividers outside cells (this would cause an assert) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 11606f0f94..b2ca536bfa 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -3206,9 +3206,7 @@ bool wxGridStringTable::DeleteCols( size_t pos, size_t numCols ) { if ( numCols >= curNumCols ) { - for (size_t i=0; i< m_data[row].GetCount(); i++) (m_data[row])[i].Clear(); - m_data[row].Empty(); -// m_data[row].Clear(); + m_data[row].Clear(); } else { @@ -5323,7 +5321,7 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event ) return; } - if ( dragRow >= 0 ) + if ( dragRow >= 0 && dragRow < GetNumberRows()) { m_dragRowOrCol = dragRow; @@ -5341,7 +5339,7 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event ) return; } - if ( dragCol >= 0 ) + if ( dragCol >= 0 && dragCol < GetNumberCols()) { m_dragRowOrCol = dragCol;