if ( coords != wxGridNoCellCoords )
{
- if ( !IsSelection() )
- {
- SelectBlock( coords, coords );
- }
- else
- {
- SelectBlock( m_currentCellCoords, coords );
+ if ( event.ControlDown() )
+ {
+ if ( m_selectingKeyboard == wxGridNoCellCoords)
+ m_selectingKeyboard = coords;
+ SelectBlock ( m_selectingKeyboard, coords );
+ }
+ else
+ {
+ if ( !IsSelection() )
+ {
+ SelectBlock( coords, coords );
+ }
+ else
+ {
+ SelectBlock( m_currentCellCoords, coords );
+ }
}
if (! IsVisible(coords))
}
else
{
- m_selection->ToggleCellSelection( coords.GetRow(),
- coords.GetCol(),
- event.ControlDown(),
- event.ShiftDown(),
- event.AltDown(),
- event.MetaDown() );
- m_selectingTopLeft = wxGridNoCellCoords;
- m_selectingBottomRight = wxGridNoCellCoords;
- SetCurrentCell( coords );
+ if ( event.ControlDown() )
+ {
+ m_selection->ToggleCellSelection( coords.GetRow(),
+ coords.GetCol(),
+ event.ControlDown(),
+ event.ShiftDown(),
+ event.AltDown(),
+ event.MetaDown() );
+ m_selectingTopLeft = wxGridNoCellCoords;
+ m_selectingBottomRight = wxGridNoCellCoords;
+ m_selectingKeyboard = coords;
+ }
+ else
+ SetCurrentCell( coords );
m_waitForSlowClick = TRUE;
}
}
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
+ {
+ ClearSelection();
SetCurrentCell( m_currentCellCoords.GetRow() - 1,
m_currentCellCoords.GetCol() );
+ }
return TRUE;
}
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
+ {
+ ClearSelection();
SetCurrentCell( m_currentCellCoords.GetRow() + 1,
m_currentCellCoords.GetCol() );
+ }
return TRUE;
}
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
+ {
+ ClearSelection();
SetCurrentCell( m_currentCellCoords.GetRow(),
m_currentCellCoords.GetCol() - 1 );
+ }
return TRUE;
}
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
- SetCurrentCell( m_currentCellCoords.GetRow(),
+ {
+ ClearSelection();
+ SetCurrentCell( m_currentCellCoords.GetRow(),
m_currentCellCoords.GetCol() + 1 );
+ }
return TRUE;
}
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
- SetCurrentCell( row, col );
-
+ {
+ ClearSelection();
+ SetCurrentCell( row, col );
+ }
return TRUE;
}
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
- SetCurrentCell( row, col );
+ {
+ ClearSelection();
+ SetCurrentCell( row, col );
+ }
return TRUE;
}
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
- SetCurrentCell( row, col );
+ {
+ ClearSelection();
+ SetCurrentCell( row, col );
+ }
return TRUE;
}
SelectBlock( m_currentCellCoords, m_selectingKeyboard );
}
else
- SetCurrentCell( row, col );
+ {
+ ClearSelection();
+ SetCurrentCell( row, col );
+ }
return TRUE;
}