]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
Added support for page tooltips to wxAuiNotebook.
[wxWidgets.git] / src / generic / grid.cpp
index 07655b6c4d0495567585038e67bc1e68f9235e06..494b74f2cc6bb7e4261dabac74aea6cb09cd6d5a 100644 (file)
@@ -1535,7 +1535,8 @@ bool wxGridStringTable::DeleteCols( size_t pos, size_t numCols )
         // the label of the first column had been set it would have only one
         // element and not numCols, so account for it
         int numRemaining = m_colLabels.size() - colID;
-        m_colLabels.RemoveAt( colID, wxMin(numCols, numRemaining) );
+        if (numRemaining > 0)
+            m_colLabels.RemoveAt( colID, wxMin(numCols, numRemaining) );
     }
 
     if ( numCols >= curNumCols )
@@ -3681,7 +3682,7 @@ wxGrid::DoGridCellDrag(wxMouseEvent& event,
                         m_selectedBlockCorner = coords;
 
                     // if event is handled by user code, no further processing
-                    if ( SendEvent(wxEVT_GRID_CELL_BEGIN_DRAG, coords, event) == 1 )
+                    if ( SendEvent(wxEVT_GRID_CELL_BEGIN_DRAG, coords, event) != 0 )
                         performDefault = false;
                     
                     return performDefault;
@@ -7681,7 +7682,7 @@ void wxGrid::SetRowSize( int row, int height )
     }
 
     // See comment in SetColSize
-    if ( height < GetRowMinimalAcceptableHeight())
+    if ( height > 0 && height < GetRowMinimalAcceptableHeight())
         return;
 
     if ( m_rowHeights.IsEmpty() )
@@ -7700,7 +7701,10 @@ void wxGrid::SetRowSize( int row, int height )
     }
 
     if ( !GetBatchCount() )
+    {
         CalcDimensions();
+        Refresh();
+    }
 }
 
 void wxGrid::SetDefaultColSize( int width, bool resizeExistingCols )