Remove wxGridSelection::ToggleCellSelection()

Remove the function because it's not usefull anymore and used only in one
place.
This commit is contained in:
Ilya Sinitsyn
2020-03-27 22:40:20 +07:00
committed by Vadim Zeitlin
parent cdf3187fe5
commit d4919d3334
3 changed files with 15 additions and 26 deletions

View File

@@ -4577,7 +4577,21 @@ wxGrid::DoGridCellLeftDown(wxMouseEvent& event,
{
if ( m_selection )
{
m_selection->ToggleCellSelection(coords, event);
if ( !m_selection->IsInSelection(coords) )
{
// If the cell is not selected, select it.
m_selection->SelectBlock(coords.GetRow(), coords.GetCol(),
coords.GetRow(), coords.GetCol(),
event);
}
else
{
// Otherwise deselect it.
m_selection->DeselectBlock(
wxGridBlockCoords(coords.GetRow(), coords.GetCol(),
coords.GetRow(), coords.GetCol()),
event);
}
}
m_selectedBlockTopLeft = wxGridNoCellCoords;