X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c118fa5f2035b48f059de0353950bceedc5a10d4..c282e47d8f2179954ca40688677961c169688084:/src/generic/grid.cpp diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 3d79bc7f7c..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 ) @@ -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 )