Refresh the grid correctly when the selection mode changes

Update the cells that had to be deselected due to the selection mode
change.

This used to work, but the refresh was lost during a previous
refactoring.
This commit is contained in:
Vadim Zeitlin 2020-04-13 14:18:11 +02:00
parent ba2772b810
commit 033f006722

View File

@ -128,8 +128,14 @@ void wxGridSelection::SetSelectionMode( wxGrid::wxGridSelectionModes selmode )
} }
if ( !valid ) if ( !valid )
{
if ( !m_grid->GetBatchCount() )
{
m_grid->RefreshBlock(block.GetTopLeft(), block.GetBottomRight());
}
m_selection.erase(m_selection.begin() + n); m_selection.erase(m_selection.begin() + n);
} }
}
m_selectionMode = selmode; m_selectionMode = selmode;
} }