// 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 )
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;
}
// See comment in SetColSize
- if ( height < GetRowMinimalAcceptableHeight())
+ if ( height > 0 && height < GetRowMinimalAcceptableHeight())
return;
if ( m_rowHeights.IsEmpty() )
}
if ( !GetBatchCount() )
+ {
CalcDimensions();
+ Refresh();
+ }
}
void wxGrid::SetDefaultColSize( int width, bool resizeExistingCols )