Stop setting current cell on first Ctrl-drag event

This is not necessary any longer as the current cell is changed on
Ctrl-click since the previous commit.

This commit is best viewed ignoring whitespace.
This commit is contained in:
Vadim Zeitlin
2020-04-13 17:52:43 +02:00
parent 39d0c21a81
commit abd9aaa431

View File

@@ -4483,26 +4483,19 @@ wxGrid::DoGridCellDrag(wxMouseEvent& event,
SaveEditControlValue(); SaveEditControlValue();
} }
switch ( event.GetModifiers() ) if ( !event.HasAnyModifiers() )
{ {
case wxMOD_CONTROL: if ( CanDragCell() )
{
if ( isFirstDrag ) if ( isFirstDrag )
SetGridCursor(coords);
break;
case wxMOD_NONE:
if ( CanDragCell() )
{ {
if ( isFirstDrag ) // if event is handled by user code, no further processing
{ if ( SendEvent(wxEVT_GRID_CELL_BEGIN_DRAG, coords, event) != 0 )
// if event is handled by user code, no further processing performDefault = false;
if ( SendEvent(wxEVT_GRID_CELL_BEGIN_DRAG, coords, event) != 0 )
performDefault = false;
return performDefault; return performDefault;
}
} }
break; }
} }
// Edit the current selection block independently of the modifiers state. // Edit the current selection block independently of the modifiers state.