X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0cbcb12d8fcbac0e4d48dddd45a1978d9d98e177..11716cbe14313011016472f56edb51c55aabe852:/src/generic/grid.cpp?ds=inline diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 07655b6c4d..494b74f2cc 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -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 )