// m_colLabels stores just as many elements as it needs, e.g. if only
// the label of the first column had been set it would have only one
// element and not numCols, so account for it
- int nToRm = m_colLabels.size() - colID;
- if ( nToRm > 0 )
- m_colLabels.RemoveAt( colID, nToRm );
+ int numRemaining = m_colLabels.size() - colID;
+ m_colLabels.RemoveAt( colID, wxMin(numCols, numRemaining) );
}
if ( numCols >= curNumCols )
ChangeCursorMode(WXGRID_CURSOR_SELECT_CELL, GetColLabelWindow());
m_dragLastPos = -1;
}
- else // not on row separator or it's not resizeable
+ else // not on row separator or it's not resizable
{
row = YToRow(y);
if ( row >=0 &&
switch ( event.GetModifiers() )
{
- case wxMOD_CMD:
+ case wxMOD_CONTROL:
if ( m_selectedBlockCorner == wxGridNoCellCoords)
m_selectedBlockCorner = coords;
UpdateBlockBeingSelected(m_selectedBlockCorner, coords);
m_cellHighlightPenWidth = width;
// Just redrawing the cell highlight is not enough since that won't
- // make any visible change if the the thickness is getting smaller.
+ // make any visible change if the thickness is getting smaller.
int row = m_currentCellCoords.GetRow();
int col = m_currentCellCoords.GetCol();
if ( row == -1 || col == -1 || GetColWidth(col) <= 0 || GetRowHeight(row) <= 0 )
m_cellHighlightROPenWidth = width;
// Just redrawing the cell highlight is not enough since that won't
- // make any visible change if the the thickness is getting smaller.
+ // make any visible change if the thickness is getting smaller.
int row = m_currentCellCoords.GetRow();
int col = m_currentCellCoords.GetCol();
if ( row == -1 || col == -1 ||