]> git.saurik.com Git - wxWidgets.git/commitdiff
Reverted previous 'fixes' now that the array bug has been cured
authorJulian Smart <julian@anthemion.co.uk>
Wed, 11 Sep 2002 14:12:48 +0000 (14:12 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 11 Sep 2002 14:12:48 +0000 (14:12 +0000)
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

src/generic/grid.cpp

index 11606f0f9424e644f8a701ff80e4f5d5e018960f..b2ca536bfa6cfc84ad1b28d32578990de2cf05fa 100644 (file)
@@ -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;